Messages in this thread | | | Subject | Re: Prezeroing V3 [1/4]: Allow request for zeroed memory | From | Dave Hansen <> | Date | Tue, 04 Jan 2005 15:45:42 -0800 |
| |
On Tue, 2005-01-04 at 15:13 -0800, Christoph Lameter wrote: > + if (gfp_flags & __GFP_ZERO) { > +#ifdef CONFIG_HIGHMEM > + if (PageHighMem(page)) { > + int n = 1 << order; > + > + while (n-- >0) > + clear_highpage(page + n); > + } else > +#endif > + clear_page(page_address(page), order); > + } > if (order && (gfp_flags & __GFP_COMP)) > prep_compound_page(page, order);
That #ifdef can probably die. The compiler should get that all by itself:
> #ifdef CONFIG_HIGHMEM > #define PageHighMem(page) test_bit(PG_highmem, &(page)->flags) > #else > #define PageHighMem(page) 0 /* needed to optimize away at compile time */ > #endif
-- Dave
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |