]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] aio: remove kioctx from mm_struct
authorZach Brown <zach.brown@oracle.com>
Mon, 14 Nov 2005 00:07:33 +0000 (16:07 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Mon, 14 Nov 2005 02:14:16 +0000 (18:14 -0800)
commit634520f15158775377ecfd29062ba9c16c929280
tree9750c39119447fb32963448bf1935e1ba22b2f9d
parentc21c5f4277dda4b7c93bca96d4b67d5441773d8d
[PATCH] aio: remove kioctx from mm_struct

Sync iocbs have a life cycle that don't need a kioctx.  Their retrying, if
any, is done in the context of their owner who has allocated them on the
stack.

The sole user of a sync iocb's ctx reference was aio_complete() checking for
an elevated iocb ref count that could never happen.  No path which grabs an
iocb ref has access to sync iocbs.

If we were to implement sync iocb cancelation it would be done by the owner of
the iocb using its on-stack reference.

Removing this chunk from aio_complete allows us to remove the entire kioctx
instance from mm_struct, reducing its size by a third.  On a i386 testing box
the slab size went from 768 to 504 bytes and from 5 to 8 per page.

Signed-off-by: Zach Brown <zach.brown@oracle.com>
Acked-by: Benjamin LaHaise <bcrl@kvack.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
fs/aio.c
include/linux/aio.h
include/linux/init_task.h
include/linux/sched.h
kernel/fork.c