On Sun, Aug 16, 2020 at 11:47:56AM +0800, Alex Shi wrote: > +++ b/mm/page_alloc.c > @@ -467,6 +467,8 @@ static inline int pfn_to_bitidx(struct page *page, unsigned long pfn) > return (pfn >> pageblock_order) * NR_PAGEBLOCK_BITS; > } > > +#define BITS_PER_CHAR 8 include/linux/bits.h:#define BITS_PER_BYTE 8 > bitmap = get_pageblock_bitmap(page, pfn); > bitidx = pfn_to_bitidx(page, pfn); > - word_bitidx = bitidx / BITS_PER_LONG; > - bitidx &= (BITS_PER_LONG-1); > + word_bitidx = bitidx / BITS_PER_CHAR; > + bitidx &= (BITS_PER_CHAR-1); It's not a word any more. it's a byte.