Hi,
While adding CPU level caches to pool_cache on the vmlocking branch, I also
changed the interface to be more LKM friendly. I need to give invalidation
the ability to drain caches on remote CPUs, but once that is done I'd like
to merge these changes into -current (but with the MP locking stubbed out
for now, some users of the interface will trigger lock assertions).
The changes are:
1. Caches are dynamically allocated so that users don't need to worry about
internal changes. The idea is that pool_cache should become the public
slab/object allocator that device drivers / LKMs use, and the pool
allocator should be for "kernel internal" use.
pool_cache_t
pool_cache_init(size_t size, u_int align, u_int align_offset,
u_int flags, const char *wchan, struct pool_allocator *palloc,
int ipl, int (*ctor)(void *, void *, int),
void (*dtor)(void *, void *), void *arg)
2. It's no longer possible to associate multiple caches with a single pool
This is not something that has been used to date, and it added complexity
to the interface and the implementation.
3. In addition to pool_cache_init(), there is also a pool_cache_bootstrap().
This is used by the VM system to set up static caches before it is
possible to allocate memory. Since these calls are in the guts of the
kernel, they don't need to worry about changes to pool_cache internals -
a recompile solves that.
4. A number of calls are added that pass through to the pool that's backing
the pool_cache, e.g. pool_cache_set_hiwat() -> pool_sethiwait().
5. If 'palloc' is NULL when creating a pool_cache / pool, then pick a
default allocator based on the value of 'ipl':
ipl == IPL_NONE -> pool_allocator_nointr
ipl != IPL_NONE -> pool_allocator_kmem
Comments?
Thanks,
Andrew
| Karl Meyer | PROBLEM: 2.6.23-rc "NETDEV WATCHDOG: eth0: transmit timed out" |
| David Miller | Slow DOWN, please!!! |
| Mark Fasheh | [PATCH 0/39] Ocfs2 updates for 2.6.28 |
| Bart Van Assche | Integration of SCST in the mainstream Linux kernel |
git: | |
| Shawn O. Pearce | Re: pack operation is thrashing my server |
| Pierre Habouzit | git send-email improvements |
| Matthieu Moy | git push to a non-bare repository |
| Shawn O. Pearce | libgit2 - a true git library |
| Elad Efrat | Integrating securelevel and kauth(9) |
| Hubert Feyrer | Re: Compressed vnd handling tested successfully |
| Lord Isildur | Re: Fork bomb protection patch |
| Matt Thomas | Re: FFS journal |
| Will Maier | cron doesn't run commands in /etc/crontab? |
| Richard Stallman | Real men don't attack straw men |
| Harald Dunkel | Re: Packet Filter: how to keep device names on hardware failure? |
| Jordi Espasa Clofent | Resolving dependencies with pkg_add |
| Question on swap as ramdisk partition | 1 hour ago | Linux kernel |
| Netfilter kernel module | 11 hours ago | Linux kernel |
| serial driver xmit problem | 14 hours ago | Linux kernel |
| Why Windows is better than Linux | 14 hours ago | Linux general |
| How can I see my kernel messages in vt12? | 21 hours ago | Linux kernel |
| Grub | 1 day ago | Linux general |
| vmalloc_fault handling in x86_64 | 1 day ago | Linux kernel |
| epoll_wait()ing on epoll FD | 1 day ago | Linux kernel |
| Framebuffer in x86_64 causes problems to multiseat | 1 day ago | Linux kernel |
| Difference between 2.4 and 2.6 regarding thread creation | 2 days ago | Linux general |
