lkml.org 
[lkml]   [2006]   [May]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] fs: fcntl_setlease defies lease_init assumptions
Pekka J Enberg wrote:

>I think you mean
>
>static inline struct kmem_cache *slab_get_cache(const void *obj)
>{
> struct kmem_cache **p = (void *)((unsigned long) obj & ~(PAGE_SIZE-1));
> return *p;
>}
>
>
>
Of course.

>On Tue, 9 May 2006, Manfred Spraul wrote:
>
>
>>The result would be a few small restrictions: all objects must start in the
>>first page of a slab (there are no exceptions on my 2.6.16 system), and
>>PAGE_SIZE'd caches are very expensive. Replacing the names_cache with
>>get_free_page is trivial. That leaves the pgd cache.
>>
>>
>
>Your plan makes sense for slabs that have slab management structures
>embedded within.
>
No - it would only make sense if it could be used for all slabs.
Otherwise: How should kfree figure out if it's called for a slab with
embedded pointers or not?

> We already have enough free space there for one pointer
>due to
>
> colour_off += cachep->slab_size;
>
>in the alloc_slabmgmt() function, I think. Are you planning to kill
>external slab management allocation completely by switching to
>get_free_pages() for those cases? I'd much rather make the switch to page
>allocator under the hood so kmalloc(PAGE_SIZE*n) would still work because
>it's much nicer API.
>
>
How many kmalloc(PAGE_SIZE*n) users are there?

--
Manfred
-
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/

\
 
 \ /
  Last update: 2006-05-09 20:29    [W:0.077 / U:1.428 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site