> On Nov 1, 2018, at 3:47 PM, Andrew Morton <a...@linux-foundation.org> wrote: > > - count = count > PAGE_SIZE ? PAGE_SIZE : count; > + count = min_t(size_t, count, PAGE_SIZE); > kbuf = kmalloc(count, GFP_KERNEL); > if (!kbuf) > return -ENOMEM; Is the use of min_t vs. the C conditional mostly to be more self-documenting? The compiler-generated assembly between the two versions seems mostly a wash. William Kucharski
- [PATCH v4] mm/page_owner: clamp read count to PAGE_SIZE miles.chen
- Re: [PATCH v4] mm/page_owner: clamp read count to P... Michal Hocko
- Re: [PATCH v4] mm/page_owner: clamp read count to P... Andrew Morton
- Re: [PATCH v4] mm/page_owner: clamp read count ... Joe Perches
- Re: [PATCH v4] mm/page_owner: clamp read co... Matthew Wilcox
- Re: [PATCH v4] mm/page_owner: clamp read count ... William Kucharski