Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1423904
| From | Michal Hocko <mhocko@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v3] mm/compaction: remove unnecessary order check in direct compact path |
| Date | 2016-06-16 12:20 +0200 |
| Message-ID | <rKCyZ-75H-19@gated-at.bofh.it> (permalink) |
| References | <rKvxv-2y1-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Thu 16-06-16 10:42:36, Ganesh Mahendran wrote: > In direct compact path, both __alloc_pages_direct_compact and > try_to_compact_pages check (order == 0). > > This patch removes the check in __alloc_pages_direct_compact() and > move the modifying of current->flags to the entry point of direct > page compaction where we really do the compaction. I do not have strong opinion on whether the order should be checked at try_to_compact_pages or __alloc_pages_direct_compact. The later one sounds more suitable because no further steps are really appropriate for order == 0. try_to_compact_pages is not used anywhere else to be order aware (maybe it will in future, who knows). But this all is a matter of taste. [...] > diff --git a/mm/compaction.c b/mm/compaction.c > index fbb7b38..dcfaf57 100644 > --- a/mm/compaction.c > +++ b/mm/compaction.c > @@ -1686,12 +1686,16 @@ enum compact_result try_to_compact_pages(gfp_t gfp_mask, unsigned int order, > > *contended = COMPACT_CONTENDED_NONE; > > - /* Check if the GFP flags allow compaction */ > + /* > + * Check if this is an order-0 request and > + * if the GFP flags allow compaction. > + */ If you are touching this comment then it would be appropriate to change it from "what is checked" into "why it is checked" because that is far from obvious from this context. Especially !fs/io part. > if (!order || !may_enter_fs || !may_perform_io) > return COMPACT_SKIPPED; > That being said, I am not really sure the patch is an improvement. If anything I would much rather see the above comment updated. Thanks! -- Michal Hocko SUSE Labs
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v3] mm/compaction: remove unnecessary order check in direct compact path Ganesh Mahendran <opensource.ganesh@gmail.com> - 2016-06-16 04:50 +0200 Re: [PATCH v3] mm/compaction: remove unnecessary order check in direct compact path Michal Hocko <mhocko@kernel.org> - 2016-06-16 12:20 +0200 Re: [PATCH v3] mm/compaction: remove unnecessary order check in direct compact path David Rientjes <rientjes@google.com> - 2016-06-21 03:00 +0200
csiph-web