Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1229214
| From | Mel Gorman <mgorman@techsingularity.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 11/12] mm, page_alloc: Reserve pageblocks for high-order atomic allocations on demand |
| Date | 2015-09-21 13:00 +0200 |
| Message-ID | <qb6Zd-4p2-41@gated-at.bofh.it> (permalink) |
| References | <q0YTf-7q8-1@gated-at.bofh.it> <q0ZcD-7Np-17@gated-at.bofh.it> <q6m8z-6Rc-45@gated-at.bofh.it> <q6N8L-3wZ-19@gated-at.bofh.it> <q9XuW-35x-13@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Fri, Sep 18, 2015 at 03:38:35PM +0900, Joonsoo Kim wrote: > > > And, there is some mismatch that check atomic high-order allocation. > > > In some place, you checked __GFP_ATOMIC, but some other places, > > > you checked ALLOC_HARDER. It is better to use unified one. > > > Introducing helper function may be a good choice. > > > > > > > Which cases specifically? In the zone_watermark check, it's because > > there is no GFP flags in that context. They could be passed in but then > > every caller needs to be updated accordingly and overall it gains > > nothing. > > You use __GFP_ATOMIC in rmqueue() to allow highatomic reserve. > ALLOC_HARDER is used in watermark check and to reserve highatomic > pageblock after allocation. > > ALLOC_HARDER is set if (__GFP_ATOMIC && !__GFP_NOMEMALLOC) *or* > (rt_task && !in_interrupt()). So, later case could pass watermark > check but cannot use HIGHATOMIC reserve. And, it will reserve > highatomic pageblock. When it try to allocate again, it can't use > this reserved pageblock due to GFP flags and this could happens > repeatedly. > And, first case also has a problem. If user requests memory > with __GFP_NOMEMALLOC, it's intend doesn't touch reserved mem, > but, in current patch, it can use highatomic pageblock. > > I'm not sure these causes real trouble but unifying it as much as > possible is preferable solution. > Ok, that makes sense. Thanks -- 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 | Find similar | Unroll thread
Re: [PATCH 11/12] mm, page_alloc: Reserve pageblocks for high-order atomic allocations on demand Joonsoo Kim <js1304@gmail.com> - 2015-09-08 10:10 +0200
Re: [PATCH 11/12] mm, page_alloc: Reserve pageblocks for high-order atomic allocations on demand Mel Gorman <mgorman@techsingularity.net> - 2015-09-09 15:00 +0200
Re: [PATCH 11/12] mm, page_alloc: Reserve pageblocks for high-order atomic allocations on demand Joonsoo Kim <iamjoonsoo.kim@lge.com> - 2015-09-18 08:40 +0200
Re: [PATCH 11/12] mm, page_alloc: Reserve pageblocks for high-order atomic allocations on demand Mel Gorman <mgorman@techsingularity.net> - 2015-09-21 13:00 +0200
csiph-web