Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1301624
| From | Michal Hocko <mhocko@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [RFC] free_pages stuff |
| Date | 2016-01-05 16:50 +0100 |
| Message-ID | <qNC1X-4OF-5@gated-at.bofh.it> (permalink) |
| References | (4 earlier) <qIkS6-6g7-3@gated-at.bofh.it> <qIquu-1u1-9@gated-at.bofh.it> <qIClX-DG-5@gated-at.bofh.it> <qNAjw-3vz-7@gated-at.bofh.it> <qNBID-4FF-51@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue 05-01-16 15:26:02, Al Viro wrote: > On Tue, Jan 05, 2016 at 02:59:03PM +0100, Michal Hocko wrote: > > > > 3) vmalloc() is for large allocations. They will be page-aligned, > > > but *not* physically contiguous. OTOH, large physically contiguous > > > allocations are generally a bad idea. Unlike other allocators, there's > > > no variant that could be used in interrupt; freeing is possible there, > > > but allocation is not. Note that non-blocking variant *does* exist - > > > __vmalloc(size, GFP_ATOMIC, PAGE_KERNEL) can be used in atomic > > > contexts; it's the interrupt ones that are no-go. > > The last sentence I'd put into that part was complete crap... > > > It is also hardcoded GFP_KERNEL context so a usage from NOFS context > > needs a special treatment. > > ... in part because of this. GFP_ATOMIC __vmalloc() will be anything but, > and the only caller passing that is almost certainly bogus. Agreed as just replied in the other email thread which I have noticed only now. > As for NOFS/NOIO, > I wonder if we should apply that special treatment inside __vmalloc_area_node > rather than in callers; see the current thread on linux-mm for details... That would make a lot of sense to me. Spreading the _special_ treatment all over the kernel is certainly worse. > Another interesting issue is __GFP_HIGHMEM meaning for kmalloc and __vmalloc > resp. (should never be passed to kmalloc, should almost always be passed > to __vmalloc - the former needs pages mapped in kernel space, the latter > probably never needs a separate kernel alias for the data pages, to such > degree that I'm not sure if we shouldn't _force_ __GFP_HIGHMEM for data pages > allocation in __vmalloc_area_node()) I would have to think about this one some more. Let's not fragment the discussion and continue in that email thread: http://lkml.kernel.org/r/20160103071246.GK9938%40ZenIV.linux.org.uk -- Michal Hocko 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: [RFC] free_pages stuff Michal Hocko <mhocko@kernel.org> - 2016-01-05 15:00 +0100
Re: [RFC] free_pages stuff Al Viro <viro@ZenIV.linux.org.uk> - 2016-01-05 16:30 +0100
Re: [RFC] free_pages stuff Michal Hocko <mhocko@kernel.org> - 2016-01-05 16:50 +0100
csiph-web