Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1565842
| From | Vlastimil Babka <vbabka@suse.cz> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 4/4] mm, page_alloc: Only use per-cpu allocator for irq-safe requests |
| Date | 2017-01-24 14:20 +0100 |
| Message-ID | <t39aW-4LM-9@gated-at.bofh.it> (permalink) |
| References | <t2OSR-8bq-7@gated-at.bofh.it> <t2P2z-8f3-53@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 01/23/2017 04:39 PM, Mel Gorman wrote: > Many workloads that allocate pages are not handling an interrupt at a > time. As allocation requests may be from IRQ context, it's necessary to > disable/enable IRQs for every page allocation. This cost is the bulk > of the free path but also a significant percentage of the allocation > path. > > This patch alters the locking and checks such that only irq-safe allocation > requests use the per-cpu allocator. All others acquire the irq-safe > zone->lock and allocate from the buddy allocator. It relies on disabling > preemption to safely access the per-cpu structures. It could be slightly > modified to avoid soft IRQs using it but it's not clear it's worthwhile. > > This modification may slow allocations from IRQ context slightly but the main > gain from the per-cpu allocator is that it scales better for allocations > from multiple contexts. There is an implicit assumption that intensive > allocations from IRQ contexts on multiple CPUs from a single NUMA node are > rare and that the fast majority of scaling issues are encountered in !IRQ > contexts such as page faulting. It's worth noting that this patch is not > required for a bulk page allocator but it significantly reduces the overhead. > [...] > Signed-off-by: Mel Gorman <mgorman@techsingularity.net> > Acked-by: Hillf Danton <hillf.zj@alibaba-inc.com> > Acked-by: Jesper Dangaard Brouer <brouer@redhat.com> Acked-by: Vlastimil Babka <vbabka@suse.cz>
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH 0/4] Use per-cpu allocator for !irq requests and prepare for a bulk allocator v5 Mel Gorman <mgorman@techsingularity.net> - 2017-01-23 16:40 +0100
[PATCH 1/4] mm, page_alloc: Split buffered_rmqueue Mel Gorman <mgorman@techsingularity.net> - 2017-01-23 16:40 +0100
Re: [PATCH 1/4] mm, page_alloc: Split buffered_rmqueue Vlastimil Babka <vbabka@suse.cz> - 2017-01-24 11:30 +0100
[PATCH] mm, page_alloc: Split buffered_rmqueue -fix Mel Gorman <mgorman@techsingularity.net> - 2017-01-24 12:30 +0100
[PATCH 3/4] mm, page_alloc: Drain per-cpu pages from workqueue context Mel Gorman <mgorman@techsingularity.net> - 2017-01-23 16:50 +0100
[PATCH 4/4] mm, page_alloc: Only use per-cpu allocator for irq-safe requests Mel Gorman <mgorman@techsingularity.net> - 2017-01-23 16:50 +0100
Re: [PATCH 4/4] mm, page_alloc: Only use per-cpu allocator for irq-safe requests Vlastimil Babka <vbabka@suse.cz> - 2017-01-24 14:20 +0100
csiph-web