Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1236432
| From | Mel Gorman <mgorman@techsingularity.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 10/10] mm, page_alloc: Only enforce watermarks for order-0 allocations |
| Date | 2015-09-30 17:20 +0200 |
| Message-ID | <qerkJ-kW-9@gated-at.bofh.it> (permalink) |
| References | <qb6Zc-4p2-3@gated-at.bofh.it> <qb84X-6al-37@gated-at.bofh.it> <qeajU-1bW-7@gated-at.bofh.it> <qelfj-8h1-3@gated-at.bofh.it> <qeqoH-7qA-51@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Wed, Sep 30, 2015 at 04:17:44PM +0200, Vlastimil Babka wrote:
> >---
> > mm/page_alloc.c | 11 ++++++++---
> > 1 file changed, 8 insertions(+), 3 deletions(-)
> >
> >diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> >index 25731624d734..fedec98aafca 100644
> >--- a/mm/page_alloc.c
> >+++ b/mm/page_alloc.c
> >@@ -2332,7 +2332,7 @@ static bool __zone_watermark_ok(struct zone *z, unsigned int order,
> > {
> > long min = mark;
> > int o;
> >- const bool alloc_harder = (alloc_flags & ALLOC_HARDER);
> >+ const int alloc_harder = (alloc_flags & ALLOC_HARDER);
>
> How bout the !!(alloc_flags & ALLOC_HARDER) conversion to bool? Unless it
> forces to make the compiler some extra work...
>
Some people frown upon that trick as being obscure when it's not unnecessary
and a modern compiler is meant to get it right. The int is clear and
obvious in this context so I just went with it.
--
Mel Gorman
SUSE Labs
--
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/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH 10/10] mm, page_alloc: Only enforce watermarks for order-0 allocations Andrew Morton <akpm@linux-foundation.org> - 2015-09-29 23:10 +0200
Re: [PATCH 10/10] mm, page_alloc: Only enforce watermarks for order-0 allocations Mel Gorman <mgorman@techsingularity.net> - 2015-09-30 10:50 +0200
Re: [PATCH 10/10] mm, page_alloc: Only enforce watermarks for order-0 allocations Vlastimil Babka <vbabka@suse.cz> - 2015-09-30 16:20 +0200
Re: [PATCH 10/10] mm, page_alloc: Only enforce watermarks for order-0 allocations Mel Gorman <mgorman@techsingularity.net> - 2015-09-30 17:20 +0200
Re: [PATCH 10/10] mm, page_alloc: Only enforce watermarks for order-0 allocations Andrew Morton <akpm@linux-foundation.org> - 2015-09-30 22:40 +0200
csiph-web