On Sun, May 21, 2023 at 09:02:36AM +0800, Wang Yugui wrote: > > +static inline unsigned fgp_order(size_t size) > > +{ > > + unsigned int shift = ilog2(size); > > + > > + if (shift <= PAGE_SHIFT) > > + return 0; > > + return (shift - PAGE_SHIFT) << 26; > > int overflow will happen when size > 0.5M(2**19)? I don't see it? size == 1 << 20; shift = 20; return (20 - 12) << 26; Looks like about 1 << 29 to me.