* vmalloc_32 and SLAB incompatible in 2.6.23.9
@ 2008-01-23 9:14 Loïc Grenié
2008-01-23 9:35 ` Andi Kleen
0 siblings, 1 reply; 4+ messages in thread
From: Loïc Grenié @ 2008-01-23 9:14 UTC (permalink / raw)
To: linux-kernel
Since GFP_DMA32 is not considered a valid flag, vmalloc_32 and
SLAB are incompatible in kernel 2.6.23.9 (and probably later ones).
It might be as simple as adding GFP_DMA32 everywhere where
GFP_DMA is used in mm/slab.c, but I don't dare do it. I personally
switched to SLUB.
Thanks,
Loïc Grenié
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: vmalloc_32 and SLAB incompatible in 2.6.23.9
2008-01-23 9:14 vmalloc_32 and SLAB incompatible in 2.6.23.9 Loïc Grenié
@ 2008-01-23 9:35 ` Andi Kleen
2008-01-23 10:04 ` Loïc Grenié
0 siblings, 1 reply; 4+ messages in thread
From: Andi Kleen @ 2008-01-23 9:35 UTC (permalink / raw)
To: Loïc Grenié; +Cc: linux-kernel
"Loïc Grenié" <loic.grenie@gmail.com> writes:
> Since GFP_DMA32 is not considered a valid flag, vmalloc_32 and
> SLAB are incompatible in kernel 2.6.23.9 (and probably later ones).
> It might be as simple as adding GFP_DMA32 everywhere where
> GFP_DMA is used in mm/slab.c, but I don't dare do it. I personally
> switched to SLUB.
I don't think it would really work for slub either.
If you look at /proc/slabinfo you see that there are separate DMA
caches. That is because sl[abo]b all cache objects and if the
objects have different requirements (like GFP_DMA, GFP_DMA32, GFP_KERNEL)
they would need different caches. Otherwise you risk getting
later objects originally allocated with the wrong flags.
To make GFP_DMA32 work would require adding another set of DMA32
caches to all kmalloc caches etc or a separate one for each
custom kmem cache that you use that only gets _DMA32 objects.
Better just use __get_free_pages() directly.
-Andi
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: vmalloc_32 and SLAB incompatible in 2.6.23.9
2008-01-23 9:35 ` Andi Kleen
@ 2008-01-23 10:04 ` Loïc Grenié
2008-01-23 10:43 ` Andi Kleen
0 siblings, 1 reply; 4+ messages in thread
From: Loïc Grenié @ 2008-01-23 10:04 UTC (permalink / raw)
To: Andi Kleen; +Cc: linux-kernel
23 Jan 2008 10:35:28 +0100, Andi Kleen <andi@firstfloor.org>:
> "Loïc Grenié" <loic.grenie@gmail.com> writes:
>
> > Since GFP_DMA32 is not considered a valid flag, vmalloc_32 and
> > SLAB are incompatible in kernel 2.6.23.9 (and probably later ones).
> > It might be as simple as adding GFP_DMA32 everywhere where
> > GFP_DMA is used in mm/slab.c, but I don't dare do it. I personally
> > switched to SLUB.
>
> I don't think it would really work for slub either.
>
> If you look at /proc/slabinfo you see that there are separate DMA
> caches. That is because sl[abo]b all cache objects and if the
> objects have different requirements (like GFP_DMA, GFP_DMA32, GFP_KERNEL)
> they would need different caches. Otherwise you risk getting
> later objects originally allocated with the wrong flags.
>
> To make GFP_DMA32 work would require adding another set of DMA32
> caches to all kmalloc caches etc or a separate one for each
> custom kmem cache that you use that only gets _DMA32 objects.
>
> Better just use __get_free_pages() directly.
vmalloc_32 is using __vmalloc. I am much too ignorant to try and change
anything in mm/*.[ch]. If vmalloc_32 is incompatible with sl[aou]b, should'nt
it be either modified or removed ?
Thanks,
Loïc Grenié
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: vmalloc_32 and SLAB incompatible in 2.6.23.9
2008-01-23 10:04 ` Loïc Grenié
@ 2008-01-23 10:43 ` Andi Kleen
0 siblings, 0 replies; 4+ messages in thread
From: Andi Kleen @ 2008-01-23 10:43 UTC (permalink / raw)
To: Loïc Grenié; +Cc: Andi Kleen, linux-kernel
> vmalloc_32 is using __vmalloc. I am much too ignorant to try and change
> anything in mm/*.[ch]. If vmalloc_32 is incompatible with sl[aou]b, should'nt
> it be either modified or removed ?
vmalloc does not use sl[aou]b for the data pages. That is why it can
support GFP_DMA32 (or even GFP_DMA if you wanted)
-Andi
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-01-23 10:09 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-23 9:14 vmalloc_32 and SLAB incompatible in 2.6.23.9 Loïc Grenié
2008-01-23 9:35 ` Andi Kleen
2008-01-23 10:04 ` Loïc Grenié
2008-01-23 10:43 ` Andi Kleen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®