fix build error on linux, fix cache line bug