Re: [RFC PATCH 08/11] lib: other kernel glue layer code
From: Hajime Tazaki <hidden>
Date: 2015-03-31 07:37:06
Also in:
linux-arch, linux-mm, lkml
Hi Richard, thanks again. At Sun, 29 Mar 2015 20:17:02 +0200, Richard Weinberger wrote:
Am 24.03.2015 um 14:10 schrieb Hajime Tazaki:quoted
These files are used to provide the same function calls so that other network stack code keeps untouched. Signed-off-by: Hajime Tazaki <redacted> Signed-off-by: Christoph Paasch <redacted> --- arch/lib/cred.c | 16 +++ arch/lib/dcache.c | 93 +++++++++++++++ arch/lib/filemap.c | 27 +++++ arch/lib/fs.c | 287 ++++++++++++++++++++++++++++++++++++++++++++ arch/lib/glue.c | 336 ++++++++++++++++++++++++++++++++++++++++++++++++++++ arch/lib/inode.c | 146 +++++++++++++++++++++++ arch/lib/modules.c | 36 ++++++ arch/lib/pid.c | 29 +++++ arch/lib/print.c | 56 +++++++++ arch/lib/proc.c | 164 +++++++++++++++++++++++++ arch/lib/random.c | 53 +++++++++ arch/lib/security.c | 45 +++++++ arch/lib/seq.c | 122 +++++++++++++++++++ arch/lib/splice.c | 20 ++++ arch/lib/super.c | 210 ++++++++++++++++++++++++++++++++ arch/lib/sysfs.c | 83 +++++++++++++ arch/lib/vmscan.c | 26 ++++ 17 files changed, 1749 insertions(+)BTW: Why do you need these stub implementations at all? If I read your code correctly it is because you're linking against the whole net/ directory. Let's take register_filesystem() again as example. net/socket.c references it in sock_init(). Maybe it would make sense to split socket.c into two files, net/socket.c and net/sockfs.c. Such that you could link only net/socket.o. Of course you'd have to convince networking folks first. :D
this is something that we've been avoided: we weren't able to estimate how much such splits will expand.
By linking selectively objects files from net/ you could get rid of a lot unneeded stubs.
now I'm trying to minimize those stubs by reusing the original codes (i.e., fs/filesystems.c for register_filesystem()). I will let you know once I've done (maybe v2 RFC if you think it's better ?) -- Hajime -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>