refine kernel buffer. complete the utest for buffer.