Re: kmem_cache_create reclaim callback? | |
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] | |
On Wed, 23 Apr 2008 10:23:56 -0400 Venkatesh Srinivas <me@xxxxxxxxxxx> wrote: > Hi, > > In Solaris, kmem_cache_create accepts a 'reclaim' callback, to be called > under memory pressure; as far as I can see, Linux's allocator doesn't > appear to have similar functionality. > > I'd imagine this functionality would be useful for subsystems that hold > caches or other resources that can be dropped safely under pressure. > > Is there any reason why Linux doesn't have this callback? Would this be > something reasonable for a newbie to work on adding? Linux has something like it, but it has a different interface. You'll want to take a look at register_shrinker() and friends in mm/vmscan.c. At reclaim time, the pageout code will call into shrink_slab(), which iterates over the reclaim functions. -- All rights reversed. -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ
[Newbies FAQ] [Kernel List] [Site Home] [IETF Annouce] [Git] [Networking] [Security] [Bugtraq] [Rubini] [Photo] [Yosemite] [MIPS Linux] [ARM Linux] [Linux Security] [Linux Networking] [Linux RAID] [Linux SCSI] [Linux ACPI] [DDR & Rambus] [UNIX Filesystems] [Linux Resources]
![]() |
![]() |