* [patch 1/4] Configure out AIO support [not found] <20080729154520.728594017@free-electrons.com> @ 2008-07-29 15:45 ` Thomas Petazzoni [not found] ` <20080729154747.574989775@free-electrons.com> [not found] ` <20080729154747.872888047@free-electrons.com> 2 siblings, 0 replies; 15+ messages in thread From: Thomas Petazzoni @ 2008-07-29 15:45 UTC (permalink / raw) To: linux-kernel, linux-embedded; +Cc: thomas.petazzoni, bcrl, linux-aio, mpm, akpm [-- Attachment #1: configure-out-aio-support --] [-- Type: text/plain, Size: 4841 bytes --] This patchs adds the CONFIG_AIO option which allows to remove support for asynchronous I/O operations, that are not necessarly used by applications, particularly on embedded devices. As this is a size-reduction option, it depends on CONFIG_EMBEDDED. It allows to save ~7 kilobytes of kernel code/data: text data bss dec hex filename 1115067 119180 217088 1451335 162547 vmlinux 1108025 119048 217088 1444161 160941 vmlinux.new -7042 -132 0 -7174 -1C06 +/- This patch has been originally written by Matt Mackall <mpm@selenic.com>, and is part of the Linux Tiny project. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: bcrl@kvack.org Cc: linux-aio@kvack.org Cc: mpm@selenic.com Cc: akpm@linux-foundation.org --- fs/Makefile | 3 ++- include/linux/aio.h | 9 +++++++++ init/Kconfig | 8 ++++++++ kernel/sys_ni.c | 5 +++++ kernel/sysctl.c | 2 ++ 5 files changed, 26 insertions(+), 1 deletion(-) Index: linuxdev/fs/Makefile =================================================================== --- linuxdev.orig/fs/Makefile +++ linuxdev/fs/Makefile @@ -8,7 +8,7 @@ obj-y := open.o read_write.o file_table.o super.o \ char_dev.o stat.o exec.o pipe.o namei.o fcntl.o \ ioctl.o readdir.o select.o fifo.o locks.o dcache.o inode.o \ - attr.o bad_inode.o file.o filesystems.o namespace.o aio.o \ + attr.o bad_inode.o file.o filesystems.o namespace.o \ seq_file.o xattr.o libfs.o fs-writeback.o \ pnode.o drop_caches.o splice.o sync.o utimes.o \ stack.o @@ -27,6 +27,7 @@ obj-$(CONFIG_SIGNALFD) += signalfd.o obj-$(CONFIG_TIMERFD) += timerfd.o obj-$(CONFIG_EVENTFD) += eventfd.o +obj-$(CONFIG_AIO) += aio.o obj-$(CONFIG_COMPAT) += compat.o compat_ioctl.o nfsd-$(CONFIG_NFSD) := nfsctl.o Index: linuxdev/include/linux/aio.h =================================================================== --- linuxdev.orig/include/linux/aio.h +++ linuxdev/include/linux/aio.h @@ -204,12 +204,21 @@ /* prototypes */ extern unsigned aio_max_size; +#ifdef CONFIG_AIO extern ssize_t wait_on_sync_kiocb(struct kiocb *iocb); extern int aio_put_req(struct kiocb *iocb); extern void kick_iocb(struct kiocb *iocb); extern int aio_complete(struct kiocb *iocb, long res, long res2); struct mm_struct; extern void exit_aio(struct mm_struct *mm); +#else +static inline ssize_t wait_on_sync_kiocb(struct kiocb *iocb) { return 0; } +static inline int aio_put_req(struct kiocb *iocb) { return 0; } +static inline void kick_iocb(struct kiocb *iocb) { } +static inline int aio_complete(struct kiocb *iocb, long res, long res2) { return 0; } +struct mm_struct; +static inline void exit_aio(struct mm_struct *mm) { } +#endif /* CONFIG_AIO */ #define io_wait_to_kiocb(wait) container_of(wait, struct kiocb, ki_wait) Index: linuxdev/init/Kconfig =================================================================== --- linuxdev.orig/init/Kconfig +++ linuxdev/init/Kconfig @@ -724,6 +724,14 @@ option replaces shmem and tmpfs with the much simpler ramfs code, which may be appropriate on small systems without swap. +config AIO + bool "Enable AIO support" if EMBEDDED + default y + help + This option enables POSIX asynchronous I/O which may by used + by some high performance threaded applications. Disabling + this option saves about 7k. + config VM_EVENT_COUNTERS default y bool "Enable VM event counters for /proc/vmstat" if EMBEDDED Index: linuxdev/kernel/sys_ni.c =================================================================== --- linuxdev.orig/kernel/sys_ni.c +++ linuxdev/kernel/sys_ni.c @@ -125,6 +125,11 @@ cond_syscall(sys_vm86); cond_syscall(compat_sys_ipc); cond_syscall(compat_sys_sysctl); +cond_syscall(sys_io_setup); +cond_syscall(sys_io_destroy); +cond_syscall(sys_io_submit); +cond_syscall(sys_io_cancel); +cond_syscall(sys_io_getevents); /* arch-specific weak syscall entries */ cond_syscall(sys_pciconfig_read); Index: linuxdev/kernel/sysctl.c =================================================================== --- linuxdev.orig/kernel/sysctl.c +++ linuxdev/kernel/sysctl.c @@ -1290,6 +1290,7 @@ .extra1 = &zero, .extra2 = &two, }, +#ifdef CONFIG_AIO { .procname = "aio-nr", .data = &aio_nr, @@ -1304,6 +1305,7 @@ .mode = 0644, .proc_handler = &proc_doulongvec_minmax, }, +#endif /* CONFIG_AIO */ #ifdef CONFIG_INOTIFY_USER { .ctl_name = FS_INOTIFY, -- Thomas Petazzoni, Free Electrons Kernel, drivers and embedded Linux development, consulting, training and support. http://free-electrons.com -- To unsubscribe, send a message with 'unsubscribe linux-aio' in the body to majordomo@kvack.org. For more info on Linux AIO, see: http://www.kvack.org/aio/ Don't email: <a href=mailto:"aart@kvack.org">aart@kvack.org</a> ^ permalink raw reply [flat|nested] 15+ messages in thread
[parent not found: <20080729154747.574989775@free-electrons.com>]
* Re: [patch 1/4] Configure out AIO support [not found] ` <20080729154747.574989775@free-electrons.com> @ 2008-07-29 16:27 ` Matt Mackall 0 siblings, 0 replies; 15+ messages in thread From: Matt Mackall @ 2008-07-29 16:27 UTC (permalink / raw) To: Thomas Petazzoni; +Cc: linux-kernel, linux-embedded, bcrl, linux-aio, akpm On Tue, 2008-07-29 at 17:45 +0200, Thomas Petazzoni wrote: > plain text document attachment (configure-out-aio-support) > This patchs adds the CONFIG_AIO option which allows to remove support > for asynchronous I/O operations, that are not necessarly used by > applications, particularly on embedded devices. As this is a > size-reduction option, it depends on CONFIG_EMBEDDED. It allows to > save ~7 kilobytes of kernel code/data: > > text data bss dec hex filename > 1115067 119180 217088 1451335 162547 vmlinux > 1108025 119048 217088 1444161 160941 vmlinux.new > -7042 -132 0 -7174 -1C06 +/- > > This patch has been originally written by Matt Mackall > <mpm@selenic.com>, and is part of the Linux Tiny project. > > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> > Cc: bcrl@kvack.org > Cc: linux-aio@kvack.org > Cc: mpm@selenic.com > Cc: akpm@linux-foundation.org These all look good to me, naturally. Signed-off-by: Matt Mackall <mpm@selenic.com> -- Mathematics is the supreme nostalgia of our time. ^ permalink raw reply [flat|nested] 15+ messages in thread
[parent not found: <20080729154747.872888047@free-electrons.com>]
* Re: [patch 2/4] Configure out file locking features [not found] ` <20080729154747.872888047@free-electrons.com> @ 2008-07-29 18:17 ` Matthew Wilcox 2008-07-29 18:57 ` Matt Mackall 2008-07-30 14:27 ` Adrian Bunk 0 siblings, 2 replies; 15+ messages in thread From: Matthew Wilcox @ 2008-07-29 18:17 UTC (permalink / raw) To: Thomas Petazzoni; +Cc: linux-kernel, linux-embedded, linux-fsdevel, mpm, akpm On Tue, Jul 29, 2008 at 05:45:22PM +0200, Thomas Petazzoni wrote: > This patch adds the CONFIG_FILE_LOCKING option which allows to remove > support for advisory locks. With this patch enabled, the flock() > system call, the F_GETLK, F_SETLK and F_SETLKW operations of fcntl() > and NFS support are disabled. These features are not necessarly needed > on embedded systems. It allows to save ~11 Kb of kernel code and data: > > text data bss dec hex filename > 1125436 118764 212992 1457192 163c28 vmlinux.old > 1114299 118564 212992 1445855 160fdf vmlinux > -11137 -200 0 -11337 -2C49 +/- > > This patch has originally been written by Matt Mackall > <mpm@selenic.com>, and is part of the Linux Tiny project. > > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> In principle, I think this is a great idea. > config NFS_FS > tristate "NFS client support" > - depends on INET > + depends on INET && FILE_LOCKING > select LOCKD > select SUNRPC > select NFS_ACL_SUPPORT if NFS_V3_ACL I think this part is a little lazy. It should be possible to support NFS without file locking. I suspect that's really not in-scope for the linux-tiny tree as currently envisaged with the focus on embedded devices that probably don't use NFS anyway. Do we want to care about the situation of a machine with fixed workload, that doesn't need file locking, but does use NFS? -- Intel are signing my paycheques ... these opinions are still mine "Bill, look, we understand that you're interested in selling us this operating system, but compare it to ours. We can't possibly take such a retrograde step." ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [patch 2/4] Configure out file locking features 2008-07-29 18:17 ` [patch 2/4] Configure out file locking features Matthew Wilcox @ 2008-07-29 18:57 ` Matt Mackall 2008-07-29 20:00 ` Jamie Lokier 2008-07-30 14:27 ` Adrian Bunk 1 sibling, 1 reply; 15+ messages in thread From: Matt Mackall @ 2008-07-29 18:57 UTC (permalink / raw) To: Matthew Wilcox Cc: Thomas Petazzoni, linux-kernel, linux-embedded, linux-fsdevel, akpm On Tue, 2008-07-29 at 12:17 -0600, Matthew Wilcox wrote: > On Tue, Jul 29, 2008 at 05:45:22PM +0200, Thomas Petazzoni wrote: > > This patch adds the CONFIG_FILE_LOCKING option which allows to remove > > support for advisory locks. With this patch enabled, the flock() > > system call, the F_GETLK, F_SETLK and F_SETLKW operations of fcntl() > > and NFS support are disabled. These features are not necessarly needed > > on embedded systems. It allows to save ~11 Kb of kernel code and data: > > > > text data bss dec hex filename > > 1125436 118764 212992 1457192 163c28 vmlinux.old > > 1114299 118564 212992 1445855 160fdf vmlinux > > -11137 -200 0 -11337 -2C49 +/- > > > > This patch has originally been written by Matt Mackall > > <mpm@selenic.com>, and is part of the Linux Tiny project. > > > > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> > > In principle, I think this is a great idea. > > > config NFS_FS > > tristate "NFS client support" > > - depends on INET > > + depends on INET && FILE_LOCKING > > select LOCKD > > select SUNRPC > > select NFS_ACL_SUPPORT if NFS_V3_ACL > > I think this part is a little lazy. It should be possible to support > NFS without file locking. I suspect that's really not in-scope for the > linux-tiny tree as currently envisaged with the focus on embedded > devices that probably don't use NFS anyway. Do we want to care about > the situation of a machine with fixed workload, that doesn't need file > locking, but does use NFS? I would lean towards no, but if someone comes along who cares, they're welcome to try it. This stuff all has to strike a balance between savings and effort/complexity/maintainability, so any time the submitter is too lazy to cover a less common use case, it's probably a good sign they're approaching that tipping point. On the other hand, if you think it's trivial to do a locking-ectomy on NFS, I'd be happy to see it. The typical embedded NFS-based devices are NAS servers and media players and are going to be more concerned about things like page cache balancing. -- Mathematics is the supreme nostalgia of our time. ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [patch 2/4] Configure out file locking features 2008-07-29 18:57 ` Matt Mackall @ 2008-07-29 20:00 ` Jamie Lokier 0 siblings, 0 replies; 15+ messages in thread From: Jamie Lokier @ 2008-07-29 20:00 UTC (permalink / raw) To: Matt Mackall Cc: Matthew Wilcox, Thomas Petazzoni, linux-kernel, linux-embedded, linux-fsdevel, akpm Matt Mackall wrote: > The typical embedded NFS-based devices are NAS servers and media players > and are going to be more concerned about things like page cache > balancing. Oh, those. It would be really annoying to buy a home NAS and find it doesn't support NFS locks or SMB oplocks. NASes are vaguely useful for more than one computer in the house at the same time. That said, I bought a big, expensive one, found it far too slow for my needs, send it back for a refund and bought a portable cheap USB disk which had *so* much higher performance. The convenience of serving multiple machines just wasn't worth the lousy performance. -- Jamie ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [patch 2/4] Configure out file locking features 2008-07-29 18:17 ` [patch 2/4] Configure out file locking features Matthew Wilcox 2008-07-29 18:57 ` Matt Mackall @ 2008-07-30 14:27 ` Adrian Bunk 2008-07-30 15:40 ` Thomas Petazzoni 1 sibling, 1 reply; 15+ messages in thread From: Adrian Bunk @ 2008-07-30 14:27 UTC (permalink / raw) To: Matthew Wilcox Cc: Thomas Petazzoni, linux-kernel, linux-embedded, linux-fsdevel, mpm, akpm It seems the emails containing the patches never made it to the vger lists, which makes it a bit hard to comment on them. Thomas, can you try to figure out what went wrong and resend them then? cu Adrian -- "Is there not promise of rain?" Ling Tan asked suddenly out of the darkness. There had been need of rain for many days. "Only a promise," Lao Er said. Pearl S. Buck - Dragon Seed ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [patch 2/4] Configure out file locking features 2008-07-30 14:27 ` Adrian Bunk @ 2008-07-30 15:40 ` Thomas Petazzoni 2008-07-31 6:27 ` Uwe Kleine-König 0 siblings, 1 reply; 15+ messages in thread From: Thomas Petazzoni @ 2008-07-30 15:40 UTC (permalink / raw) To: Adrian Bunk Cc: Matthew Wilcox, linux-kernel, linux-embedded, linux-fsdevel, mpm, akpm [-- Attachment #1: Type: text/plain, Size: 2070 bytes --] Le Wed, 30 Jul 2008 17:27:54 +0300, Adrian Bunk <bunk@kernel.org> a écrit : > It seems the emails containing the patches never made it to the vger > lists, which makes it a bit hard to comment on them. Yes, they didn't make it to the lists, for some reason. Maybe it's because I sent them using "quilt mail --send", which uses my local exim4 mail server, and for some reason, vger doesn't like that kind of e-mails. However, my exim4 is configured to sent the e-mails through by ISP SMTP. From my exim4 mainlog: 2008-07-29 17:47:57 1KNrQS-0007kt-Kg => linux-kernel@vger.kernel.org R=smarthost T=remote_smtp_smarthost H=smtp.free.fr [212.27.48.4]* 2008-07-29 17:47:57 1KNrQS-0007kt-Kg -> linux-embedded@vger.kernel.org R=smarthost T=remote_smtp_smarthost H=smtp.free.fr [212.27.48.4]* 2008-07-29 17:47:57 1KNrQS-0007kt-Kg -> netdev@vger.kernel.org R=smarthost T=remote_smtp_smarthost H=smtp.free.fr [212.27.48.4]* 2008-07-29 17:47:57 1KNrQS-0007kt-Kg -> davem@davemloft.net R=smarthost T=remote_smtp_smarthost H=smtp.free.fr [212.27.48.4]* 2008-07-29 17:47:57 1KNrQS-0007kt-Kg -> mpm@selenic.com R=smarthost T=remote_smtp_smarthost H=smtp.free.fr [212.27.48.4]* 2008-07-29 17:47:57 1KNrQS-0007kt-Kg -> akpm@linux-foundation.org R=smarthost T=remote_smtp_smarthost H=smtp.free.fr [212.27.48.4]* 2008-07-29 17:47:57 1KNrQS-0007kt-Kg -> thomas.petazzoni@free-electrons.com R=smarthost T=remote_smtp_smarthost H=smtp.free.fr [212.27.48.4]* 2008-07-29 17:47:57 1KNrQS-0007kt-Kg -> michael@free-electrons.com R=smarthost T=remote_smtp_smarthost H=smtp.free.fr [212.27.48.4]* 2008-07-29 17:47:57 1KNrQS-0007kt-Kg Completed So from my side, everything seemed to work well. Does anybody has a clue ? > Thomas, can you try to figure out what went wrong and resend them > then? I will send them again through my normal MUA, using quilt mail --mbox. Hopefully it'll work. Sincerly, Thomas -- Thomas Petazzoni, Free Electrons Kernel, drivers and embedded Linux development, consulting, training and support. http://free-electrons.com [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 189 bytes --] ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [patch 2/4] Configure out file locking features 2008-07-30 15:40 ` Thomas Petazzoni @ 2008-07-31 6:27 ` Uwe Kleine-König 0 siblings, 0 replies; 15+ messages in thread From: Uwe Kleine-König @ 2008-07-31 6:27 UTC (permalink / raw) To: Thomas Petazzoni Cc: Adrian Bunk, Matthew Wilcox, linux-kernel@vger.kernel.org, linux-embedded@vger.kernel.org, linux-fsdevel@vger.kernel.org, mpm@selenic.com, akpm@linux-foundation.org Hello Thomas, Thomas Petazzoni wrote: > Le Wed, 30 Jul 2008 17:27:54 +0300, > Adrian Bunk <bunk@kernel.org> a écrit : > > > It seems the emails containing the patches never made it to the vger > > lists, which makes it a bit hard to comment on them. > > Yes, they didn't make it to the lists, for some reason. Maybe it's > because I sent them using "quilt mail --send", which uses my local > exim4 mail server, and for some reason, vger doesn't like that kind of > e-mails. However, my exim4 is configured to sent the e-mails through by > ISP SMTP. From my exim4 mainlog: > > 2008-07-29 17:47:57 1KNrQS-0007kt-Kg => linux-kernel@vger.kernel.org R=smarthost T=remote_smtp_smarthost H=smtp.free.fr [212.27.48.4]* > 2008-07-29 17:47:57 1KNrQS-0007kt-Kg -> linux-embedded@vger.kernel.org R=smarthost T=remote_smtp_smarthost H=smtp.free.fr [212.27.48.4]* > 2008-07-29 17:47:57 1KNrQS-0007kt-Kg -> netdev@vger.kernel.org R=smarthost T=remote_smtp_smarthost H=smtp.free.fr [212.27.48.4]* > 2008-07-29 17:47:57 1KNrQS-0007kt-Kg -> davem@davemloft.net R=smarthost T=remote_smtp_smarthost H=smtp.free.fr [212.27.48.4]* > 2008-07-29 17:47:57 1KNrQS-0007kt-Kg -> mpm@selenic.com R=smarthost T=remote_smtp_smarthost H=smtp.free.fr [212.27.48.4]* > 2008-07-29 17:47:57 1KNrQS-0007kt-Kg -> akpm@linux-foundation.org R=smarthost T=remote_smtp_smarthost H=smtp.free.fr [212.27.48.4]* > 2008-07-29 17:47:57 1KNrQS-0007kt-Kg -> thomas.petazzoni@free-electrons.com R=smarthost T=remote_smtp_smarthost H=smtp.free.fr [212.27.48.4]* > 2008-07-29 17:47:57 1KNrQS-0007kt-Kg -> michael@free-electrons.com R=smarthost T=remote_smtp_smarthost H=smtp.free.fr [212.27.48.4]* > 2008-07-29 17:47:57 1KNrQS-0007kt-Kg Completed > > So from my side, everything seemed to work well. Does anybody has a > clue ? Don't know if this is the problem, but I had problems getting mails through some time ago, too. For me the problem was that the source address was myusername@mymachine.intranet.$mycompany.$tld and vger.kernel.org didn't want to take these because the host name had no DNS entry. I fixed that by rewriting the From line in outgoing mails on my host. I'm using postfix (from Debian) so I had to add an entry to /etc/postfix/sender_canonical. Best regards Uwe -- Uwe Kleine-König, Software Engineer Digi International GmbH Branch Breisach, Küferstrasse 8, 79206 Breisach, Germany Tax: 315/5781/0242 / VAT: DE153662976 / Reg. Amtsgericht Dortmund HRB 13962 -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 15+ messages in thread
* [patch 0/4] [resend] Add configuration options to disable features not needed on embedded devices @ 2008-07-31 9:27 Thomas Petazzoni 2008-07-31 9:27 ` [patch 1/4] Configure out AIO support Thomas Petazzoni 0 siblings, 1 reply; 15+ messages in thread From: Thomas Petazzoni @ 2008-07-31 9:27 UTC (permalink / raw) To: linux-kernel, linux-embedded; +Cc: michael Hi, This is a resend of the small patch list I sent on July, 29th. I'm resending the patches because they didn't make it to vger lists for some setup problem on my side, and because I've been asked by Adrian Bunk to resend them in order to get proper review. However, please note that the patches removing ethtool and IGMP have both been nack-ed by David Miller. The resend of these patches is not an intent to workaround these NACKs in any way: I'm resending because I've been asked to do so. I apologize for the mess, and hope that this time, the mails will reach vger lists. Changes since previous post: * Add Matt Mackall's Signed-off-by on all patches * Make bonding and bridging select ethtool in the ethtool-related patch. Sincerly, Thomas -- Thomas Petazzoni, Free Electrons Kernel, drivers and embedded Linux development, consulting, training and support. http://free-electrons.com ^ permalink raw reply [flat|nested] 15+ messages in thread
* [patch 1/4] Configure out AIO support 2008-07-31 9:27 [patch 0/4] [resend] Add configuration options to disable features not needed on embedded devices Thomas Petazzoni @ 2008-07-31 9:27 ` Thomas Petazzoni 2008-07-31 10:09 ` Bernhard Fischer 0 siblings, 1 reply; 15+ messages in thread From: Thomas Petazzoni @ 2008-07-31 9:27 UTC (permalink / raw) To: linux-kernel, linux-embedded Cc: michael, Thomas Petazzoni, Matt Mackall, bcrl, linux-aio, akpm [-- Attachment #1: configure-out-aio-support --] [-- Type: text/plain, Size: 4663 bytes --] This patchs adds the CONFIG_AIO option which allows to remove support for asynchronous I/O operations, that are not necessarly used by applications, particularly on embedded devices. As this is a size-reduction option, it depends on CONFIG_EMBEDDED. It allows to save ~7 kilobytes of kernel code/data: text data bss dec hex filename 1115067 119180 217088 1451335 162547 vmlinux 1108025 119048 217088 1444161 160941 vmlinux.new -7042 -132 0 -7174 -1C06 +/- This patch has been originally written by Matt Mackall <mpm@selenic.com>, and is part of the Linux Tiny project. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Matt Mackall <mpm@selenic.com> Cc: bcrl@kvack.org Cc: linux-aio@kvack.org Cc: mpm@selenic.com Cc: akpm@linux-foundation.org --- fs/Makefile | 3 ++- include/linux/aio.h | 9 +++++++++ init/Kconfig | 8 ++++++++ kernel/sys_ni.c | 5 +++++ kernel/sysctl.c | 2 ++ 5 files changed, 26 insertions(+), 1 deletion(-) Index: linuxdev/fs/Makefile =================================================================== --- linuxdev.orig/fs/Makefile +++ linuxdev/fs/Makefile @@ -8,7 +8,7 @@ obj-y := open.o read_write.o file_table.o super.o \ char_dev.o stat.o exec.o pipe.o namei.o fcntl.o \ ioctl.o readdir.o select.o fifo.o locks.o dcache.o inode.o \ - attr.o bad_inode.o file.o filesystems.o namespace.o aio.o \ + attr.o bad_inode.o file.o filesystems.o namespace.o \ seq_file.o xattr.o libfs.o fs-writeback.o \ pnode.o drop_caches.o splice.o sync.o utimes.o \ stack.o @@ -27,6 +27,7 @@ obj-$(CONFIG_SIGNALFD) += signalfd.o obj-$(CONFIG_TIMERFD) += timerfd.o obj-$(CONFIG_EVENTFD) += eventfd.o +obj-$(CONFIG_AIO) += aio.o obj-$(CONFIG_COMPAT) += compat.o compat_ioctl.o nfsd-$(CONFIG_NFSD) := nfsctl.o Index: linuxdev/include/linux/aio.h =================================================================== --- linuxdev.orig/include/linux/aio.h +++ linuxdev/include/linux/aio.h @@ -204,12 +204,21 @@ /* prototypes */ extern unsigned aio_max_size; +#ifdef CONFIG_AIO extern ssize_t wait_on_sync_kiocb(struct kiocb *iocb); extern int aio_put_req(struct kiocb *iocb); extern void kick_iocb(struct kiocb *iocb); extern int aio_complete(struct kiocb *iocb, long res, long res2); struct mm_struct; extern void exit_aio(struct mm_struct *mm); +#else +static inline ssize_t wait_on_sync_kiocb(struct kiocb *iocb) { return 0; } +static inline int aio_put_req(struct kiocb *iocb) { return 0; } +static inline void kick_iocb(struct kiocb *iocb) { } +static inline int aio_complete(struct kiocb *iocb, long res, long res2) { return 0; } +struct mm_struct; +static inline void exit_aio(struct mm_struct *mm) { } +#endif /* CONFIG_AIO */ #define io_wait_to_kiocb(wait) container_of(wait, struct kiocb, ki_wait) Index: linuxdev/init/Kconfig =================================================================== --- linuxdev.orig/init/Kconfig +++ linuxdev/init/Kconfig @@ -724,6 +724,14 @@ option replaces shmem and tmpfs with the much simpler ramfs code, which may be appropriate on small systems without swap. +config AIO + bool "Enable AIO support" if EMBEDDED + default y + help + This option enables POSIX asynchronous I/O which may by used + by some high performance threaded applications. Disabling + this option saves about 7k. + config VM_EVENT_COUNTERS default y bool "Enable VM event counters for /proc/vmstat" if EMBEDDED Index: linuxdev/kernel/sys_ni.c =================================================================== --- linuxdev.orig/kernel/sys_ni.c +++ linuxdev/kernel/sys_ni.c @@ -125,6 +125,11 @@ cond_syscall(sys_vm86); cond_syscall(compat_sys_ipc); cond_syscall(compat_sys_sysctl); +cond_syscall(sys_io_setup); +cond_syscall(sys_io_destroy); +cond_syscall(sys_io_submit); +cond_syscall(sys_io_cancel); +cond_syscall(sys_io_getevents); /* arch-specific weak syscall entries */ cond_syscall(sys_pciconfig_read); Index: linuxdev/kernel/sysctl.c =================================================================== --- linuxdev.orig/kernel/sysctl.c +++ linuxdev/kernel/sysctl.c @@ -1290,6 +1290,7 @@ .extra1 = &zero, .extra2 = &two, }, +#ifdef CONFIG_AIO { .procname = "aio-nr", .data = &aio_nr, @@ -1304,6 +1305,7 @@ .mode = 0644, .proc_handler = &proc_doulongvec_minmax, }, +#endif /* CONFIG_AIO */ #ifdef CONFIG_INOTIFY_USER { .ctl_name = FS_INOTIFY, -- Thomas Petazzoni, Free Electrons Kernel, drivers and embedded Linux development, consulting, training and support. http://free-electrons.com ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [patch 1/4] Configure out AIO support 2008-07-31 9:27 ` [patch 1/4] Configure out AIO support Thomas Petazzoni @ 2008-07-31 10:09 ` Bernhard Fischer 2008-07-31 10:12 ` Adrian Bunk 0 siblings, 1 reply; 15+ messages in thread From: Bernhard Fischer @ 2008-07-31 10:09 UTC (permalink / raw) To: Thomas Petazzoni Cc: linux-kernel, linux-embedded, michael, Matt Mackall, bcrl, linux-aio, akpm On Thu, Jul 31, 2008 at 11:27:04AM +0200, Thomas Petazzoni wrote: >This patchs adds the CONFIG_AIO option which allows to remove support >for asynchronous I/O operations, that are not necessarly used by >applications, particularly on embedded devices. As this is a >size-reduction option, it depends on CONFIG_EMBEDDED. It allows to >save ~7 kilobytes of kernel code/data: Shouldn't this also make sure not to install aio_abi.h or at least an empty aio_abi.h? ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [patch 1/4] Configure out AIO support 2008-07-31 10:09 ` Bernhard Fischer @ 2008-07-31 10:12 ` Adrian Bunk 2008-07-31 22:42 ` Bernhard Fischer 0 siblings, 1 reply; 15+ messages in thread From: Adrian Bunk @ 2008-07-31 10:12 UTC (permalink / raw) To: Bernhard Fischer Cc: Thomas Petazzoni, linux-kernel, linux-embedded, michael, Matt Mackall, bcrl, linux-aio, akpm On Thu, Jul 31, 2008 at 12:09:29PM +0200, Bernhard Fischer wrote: > On Thu, Jul 31, 2008 at 11:27:04AM +0200, Thomas Petazzoni wrote: > >This patchs adds the CONFIG_AIO option which allows to remove support > >for asynchronous I/O operations, that are not necessarly used by > >applications, particularly on embedded devices. As this is a > >size-reduction option, it depends on CONFIG_EMBEDDED. It allows to > >save ~7 kilobytes of kernel code/data: > > Shouldn't this also make sure not to install aio_abi.h or at least an > empty aio_abi.h? The userspace headers are independent of any kernel configuration (except for the architecture). cu Adrian -- "Is there not promise of rain?" Ling Tan asked suddenly out of the darkness. There had been need of rain for many days. "Only a promise," Lao Er said. Pearl S. Buck - Dragon Seed ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [patch 1/4] Configure out AIO support 2008-07-31 10:12 ` Adrian Bunk @ 2008-07-31 22:42 ` Bernhard Fischer 2008-08-05 18:15 ` Adrian Bunk 0 siblings, 1 reply; 15+ messages in thread From: Bernhard Fischer @ 2008-07-31 22:42 UTC (permalink / raw) To: Adrian Bunk Cc: Thomas Petazzoni, linux-kernel, linux-embedded, michael, Matt Mackall, bcrl, linux-aio, akpm On Thu, Jul 31, 2008 at 01:12:19PM +0300, Adrian Bunk wrote: >On Thu, Jul 31, 2008 at 12:09:29PM +0200, Bernhard Fischer wrote: >> On Thu, Jul 31, 2008 at 11:27:04AM +0200, Thomas Petazzoni wrote: >> >This patchs adds the CONFIG_AIO option which allows to remove support >> >for asynchronous I/O operations, that are not necessarly used by >> >applications, particularly on embedded devices. As this is a >> >size-reduction option, it depends on CONFIG_EMBEDDED. It allows to >> >save ~7 kilobytes of kernel code/data: >> >> Shouldn't this also make sure not to install aio_abi.h or at least an >> empty aio_abi.h? > >The userspace headers are independent of any kernel configuration >(except for the architecture). I beg to disagree: internals as exposed by e.g. aio_abi.h are impl dependent. Noone except the impl and it's users are interrested in it. If a per package feature, independent of arch, is off, all respective features stuff should be off for that particular installation. I.e. if I, for subsequent installations, choose to turn on feature, the requested feature-stuff will be installed properly. If I, OTOH, choose to (keep to) turn off feature, then all feature-related stuff should -- and has to be and stay -- turned off. In the particular case of the kernel exposing unwanted API extensions that are off, all such API reminiscences should be off, thus not installed to my staging dir at all since i explicitely asked for doing away with all of the API. From a libc POV i'd agree, but from an inherently broken userspace POV installing willingly broken stuff is just wrong and misleading, imo. ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [patch 1/4] Configure out AIO support 2008-07-31 22:42 ` Bernhard Fischer @ 2008-08-05 18:15 ` Adrian Bunk 2008-08-05 18:26 ` Jamie Lokier 0 siblings, 1 reply; 15+ messages in thread From: Adrian Bunk @ 2008-08-05 18:15 UTC (permalink / raw) To: Bernhard Fischer Cc: Thomas Petazzoni, linux-kernel, linux-embedded, michael, Matt Mackall, bcrl, linux-aio, akpm On Fri, Aug 01, 2008 at 12:42:22AM +0200, Bernhard Fischer wrote: > On Thu, Jul 31, 2008 at 01:12:19PM +0300, Adrian Bunk wrote: > >On Thu, Jul 31, 2008 at 12:09:29PM +0200, Bernhard Fischer wrote: > >> On Thu, Jul 31, 2008 at 11:27:04AM +0200, Thomas Petazzoni wrote: > >> >This patchs adds the CONFIG_AIO option which allows to remove support > >> >for asynchronous I/O operations, that are not necessarly used by > >> >applications, particularly on embedded devices. As this is a > >> >size-reduction option, it depends on CONFIG_EMBEDDED. It allows to > >> >save ~7 kilobytes of kernel code/data: > >> > >> Shouldn't this also make sure not to install aio_abi.h or at least an > >> empty aio_abi.h? > > > >The userspace headers are independent of any kernel configuration > >(except for the architecture). > > I beg to disagree: > internals as exposed by e.g. aio_abi.h are impl dependent. Noone except > the impl and it's users are interrested in it. >... That's utter bullshit. The contents of aio_abi.h is a kernel<->userspace ABI that mustn't ever change. [1] cu Adrian [1] there are some exceptions like adding stuff (but not in existing structs), but basically the contents of aio_abi.h is cast in stone -- "Is there not promise of rain?" Ling Tan asked suddenly out of the darkness. There had been need of rain for many days. "Only a promise," Lao Er said. Pearl S. Buck - Dragon Seed ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [patch 1/4] Configure out AIO support 2008-08-05 18:15 ` Adrian Bunk @ 2008-08-05 18:26 ` Jamie Lokier 2008-08-05 18:36 ` Bernhard Fischer 0 siblings, 1 reply; 15+ messages in thread From: Jamie Lokier @ 2008-08-05 18:26 UTC (permalink / raw) To: Adrian Bunk Cc: Bernhard Fischer, Thomas Petazzoni, linux-kernel, linux-embedded, michael, Matt Mackall, bcrl, linux-aio, akpm Adrian Bunk wrote: > On Fri, Aug 01, 2008 at 12:42:22AM +0200, Bernhard Fischer wrote: > > On Thu, Jul 31, 2008 at 01:12:19PM +0300, Adrian Bunk wrote: > > >On Thu, Jul 31, 2008 at 12:09:29PM +0200, Bernhard Fischer wrote: > > >> On Thu, Jul 31, 2008 at 11:27:04AM +0200, Thomas Petazzoni wrote: > > >> >This patchs adds the CONFIG_AIO option which allows to remove support > > >> >for asynchronous I/O operations, that are not necessarly used by > > >> >applications, particularly on embedded devices. As this is a > > >> >size-reduction option, it depends on CONFIG_EMBEDDED. It allows to > > >> >save ~7 kilobytes of kernel code/data: > > >> > > >> Shouldn't this also make sure not to install aio_abi.h or at least an > > >> empty aio_abi.h? > > > > > >The userspace headers are independent of any kernel configuration > > >(except for the architecture). > > > > I beg to disagree: > > internals as exposed by e.g. aio_abi.h are impl dependent. Noone except > > the impl and it's users are interrested in it. > >... > > That's utter bullshit. > > The contents of aio_abi.h is a kernel<->userspace ABI that mustn't ever > change. [1] Case in point: I want to be able to compile an application for embedded Linux which *can use* Linux-AIO, but can also run on a kernel which has Linux-AIO removed by this patch. I still want to compile the application with that capability, in case it's run on another kernel with it enabled. I shouldn't have to have a separate, special kernel with all options enabled, just to compile applications that run on multiple kernels and use run-time features when available. Just like all the other kernel<->userspace interfaces, the header files (including their presence) shouldn't depend on kernel configuration at all. -- Jamie ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [patch 1/4] Configure out AIO support 2008-08-05 18:26 ` Jamie Lokier @ 2008-08-05 18:36 ` Bernhard Fischer 0 siblings, 0 replies; 15+ messages in thread From: Bernhard Fischer @ 2008-08-05 18:36 UTC (permalink / raw) To: Jamie Lokier Cc: Adrian Bunk, Thomas Petazzoni, linux-kernel, linux-embedded, michael, Matt Mackall, bcrl, linux-aio, akpm On Tue, Aug 05, 2008 at 07:26:07PM +0100, Jamie Lokier wrote: >> > >The userspace headers are independent of any kernel configuration >> > >(except for the architecture). >> > >> > I beg to disagree: >> > internals as exposed by e.g. aio_abi.h are impl dependent. Noone except >> > the impl and it's users are interrested in it. >> >... >> >> That's utter bullshit. >> >> The contents of aio_abi.h is a kernel<->userspace ABI that mustn't ever >> change. [1] > >Case in point: > >I want to be able to compile an application for embedded Linux which >*can use* Linux-AIO, but can also run on a kernel which has Linux-AIO >removed by this patch. > >I still want to compile the application with that capability, in case >it's run on another kernel with it enabled. > >I shouldn't have to have a separate, special kernel with all options >enabled, just to compile applications that run on multiple kernels and >use run-time features when available. > >Just like all the other kernel<->userspace interfaces, the header >files (including their presence) shouldn't depend on kernel >configuration at all. alright, makes perfect sense. I must have been playing too much with libc recently, i guess. thanks, ^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2008-08-05 18:36 UTC | newest] Thread overview: 15+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <20080729154520.728594017@free-electrons.com> 2008-07-29 15:45 ` [patch 1/4] Configure out AIO support Thomas Petazzoni [not found] ` <20080729154747.574989775@free-electrons.com> 2008-07-29 16:27 ` Matt Mackall [not found] ` <20080729154747.872888047@free-electrons.com> 2008-07-29 18:17 ` [patch 2/4] Configure out file locking features Matthew Wilcox 2008-07-29 18:57 ` Matt Mackall 2008-07-29 20:00 ` Jamie Lokier 2008-07-30 14:27 ` Adrian Bunk 2008-07-30 15:40 ` Thomas Petazzoni 2008-07-31 6:27 ` Uwe Kleine-König 2008-07-31 9:27 [patch 0/4] [resend] Add configuration options to disable features not needed on embedded devices Thomas Petazzoni 2008-07-31 9:27 ` [patch 1/4] Configure out AIO support Thomas Petazzoni 2008-07-31 10:09 ` Bernhard Fischer 2008-07-31 10:12 ` Adrian Bunk 2008-07-31 22:42 ` Bernhard Fischer 2008-08-05 18:15 ` Adrian Bunk 2008-08-05 18:26 ` Jamie Lokier 2008-08-05 18:36 ` Bernhard Fischer
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).