kernel - Optimize the x86-64 lwbuf API