cpuset cleanup race

2016-04-26 Thread Ulrich Drepper
I came across a problem with code which uses a cpuset CG and tries to be responsible and clean up after itself. The code attached at the bottom illustrates the problem. It's only long because it has no dependencies aside from the basic runtime and should work on all machines. You need to run it

cpuset cleanup race

2016-04-26 Thread Ulrich Drepper
I came across a problem with code which uses a cpuset CG and tries to be responsible and clean up after itself. The code attached at the bottom illustrates the problem. It's only long because it has no dependencies aside from the basic runtime and should work on all machines. You need to run it

Re: NUMA node information for pages

2014-04-07 Thread Ulrich Drepper
On Mon, Mar 31, 2014 at 9:24 PM, Naoya Horiguchi wrote: > The information about "pfn-node" mapping seldom (or never) changes after boot, > so it seems better to me that adding a new interface somewhere under > /sys/devices/system/node/nodeN which shows pfn range of a given node. > If this doesn't

Re: NUMA node information for pages

2014-04-07 Thread Ulrich Drepper
On Mon, Mar 31, 2014 at 9:24 PM, Naoya Horiguchi n-horigu...@ah.jp.nec.com wrote: The information about pfn-node mapping seldom (or never) changes after boot, so it seems better to me that adding a new interface somewhere under /sys/devices/system/node/nodeN which shows pfn range of a given

NUMA node information for pages

2014-03-31 Thread Ulrich Drepper
. If this is correct, could the attached patch be considered? It's really simple and follows the same line as the kpageflags file. Signed-off-by: Ulrich Drepper Documentation/vm/pagemap.txt |3 ++ fs/proc/page.c | 50 +++ 2 files changed, 53

NUMA node information for pages

2014-03-31 Thread Ulrich Drepper
. If this is correct, could the attached patch be considered? It's really simple and follows the same line as the kpageflags file. Signed-off-by: Ulrich Drepper drep...@gmail.com Documentation/vm/pagemap.txt |3 ++ fs/proc/page.c | 50 +++ 2

Re: [RFC] apparently broken RLIMIT_CORE

2013-10-06 Thread Ulrich Drepper
On Sun, Oct 6, 2013 at 4:42 PM, Linus Torvalds wrote: > I doubt it is intentional, but I also cannot really feel that we care > deeply. Afaik we don't really honor the size limit exactly anyway, ie > we tend to check only at page boundaries etc. So do we really care? I could imagine in the case

Re: [RFC] apparently broken RLIMIT_CORE

2013-10-06 Thread Ulrich Drepper
On Sun, Oct 6, 2013 at 4:42 PM, Linus Torvalds torva...@linux-foundation.org wrote: I doubt it is intentional, but I also cannot really feel that we care deeply. Afaik we don't really honor the size limit exactly anyway, ie we tend to check only at page boundaries etc. So do we really care? I

[PATCH] perf: remove duplicate block from Makefile

2013-10-05 Thread Ulrich Drepper
This looks like a merge error, the code is duplicated with the first copy doing something else as well. Just remove the second block. Signed-off-by: Ulrich Drepper Makefile |8 1 file changed, 8 deletions(-) Index: perf/config/Makefile

[PATCH] perf: remove duplicate block from Makefile

2013-10-05 Thread Ulrich Drepper
This looks like a merge error, the code is duplicated with the first copy doing something else as well. Just remove the second block. Signed-off-by: Ulrich Drepper drep...@gmail.com Makefile |8 1 file changed, 8 deletions(-) Index: perf/config/Makefile

Re: sendfile and EAGAIN

2013-03-02 Thread Ulrich Drepper
On Sat, Mar 2, 2013 at 10:09 PM, Eric Dumazet wrote: > > Using non blocking IO means the sender (and the receiver) must be able > to perform several operations, as long as the whole transfert is not > finished. Certainly, and this is implemented. But the receiver never gets the rest of the data

Re: sendfile and EAGAIN

2013-03-02 Thread Ulrich Drepper
On Mon, Feb 25, 2013 at 2:22 PM, Eric Dumazet wrote: > I don't understand the issue. > > sendfile() returns -EAGAIN only if no bytes were copied to the socket. There is something wrong/unexpected/... I have a program which can use either sendfile or send. When using sendfile to transmit a

Re: sendfile and EAGAIN

2013-03-02 Thread Ulrich Drepper
On Mon, Feb 25, 2013 at 2:22 PM, Eric Dumazet eric.duma...@gmail.com wrote: I don't understand the issue. sendfile() returns -EAGAIN only if no bytes were copied to the socket. There is something wrong/unexpected/... I have a program which can use either sendfile or send. When using sendfile

Re: sendfile and EAGAIN

2013-03-02 Thread Ulrich Drepper
On Sat, Mar 2, 2013 at 10:09 PM, Eric Dumazet eric.duma...@gmail.com wrote: Using non blocking IO means the sender (and the receiver) must be able to perform several operations, as long as the whole transfert is not finished. Certainly, and this is implemented. But the receiver never gets

Re: [RFC 0/4] perf tool: Adding ratios support

2013-01-16 Thread Ulrich Drepper
On Wed, Jan 16, 2013 at 9:25 AM, Jiri Olsa wrote: > I was thinking having config files (global and arch specific) > comming with perf having predefined formulas. All the more reason to not mention the file name or really any source for the definition of the formula in the name, > 1) -e

Re: [RFC 0/4] perf tool: Adding ratios support

2013-01-16 Thread Ulrich Drepper
On Tue, Jan 15, 2013 at 8:39 AM, Jiri Olsa wrote: > $ perf stat -f formula.conf:cpi kill > usage: kill [ -s signal | -p ] [ -a ] pid ... > kill -l [ signal ] I do like this proposal. The only comment I have is that perhaps the command line syntax isn't ideal. What you use above is

Re: [RFC 0/4] perf tool: Adding ratios support

2013-01-16 Thread Ulrich Drepper
On Tue, Jan 15, 2013 at 8:39 AM, Jiri Olsa jo...@redhat.com wrote: $ perf stat -f formula.conf:cpi kill usage: kill [ -s signal | -p ] [ -a ] pid ... kill -l [ signal ] I do like this proposal. The only comment I have is that perhaps the command line syntax isn't ideal. What you

Re: [RFC 0/4] perf tool: Adding ratios support

2013-01-16 Thread Ulrich Drepper
On Wed, Jan 16, 2013 at 9:25 AM, Jiri Olsa jo...@redhat.com wrote: I was thinking having config files (global and arch specific) comming with perf having predefined formulas. All the more reason to not mention the file name or really any source for the definition of the formula in the name,

Re: [PATCH 2/2] perf: use XSI-complaint version of strerror_r() instead of GNU-specific

2012-07-23 Thread Ulrich Drepper
On Mon, Jul 23, 2012 at 5:06 PM, Kirill A. Shutemov wrote: > They are bugs. > > Let's fix strerror_r() usage. > > Signed-off-by: Kirill A. Shutemov Acked-by: Ulrich Drepper -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the bo

Re: [PATCH 2/2] perf: use XSI-complaint version of strerror_r() instead of GNU-specific

2012-07-23 Thread Ulrich Drepper
On Mon, Jul 23, 2012 at 4:31 PM, Kirill A. Shutemov wrote: > + const char *err = strerror_r(errnum, buf, buflen); > + > + if (err != buf && buflen > 0) { > + size_t len = strlen(err); > + char *c = mempcpy(buf, err,

Re: [PATCH 2/2] perf: use XSI-complaint version of strerror_r() instead of GNU-specific

2012-07-23 Thread Ulrich Drepper
On Mon, Jul 23, 2012 at 11:00 AM, Kirill A. Shutemov wrote: > The right way to fix it is to switch to XSI-compliant version. And why exactly would this be "the right way"? Just fix the use of strerror_r or use strerror_l. -- To unsubscribe from this list: send the line "unsubscribe

Re: [PATCH 2/2] perf: use XSI-complaint version of strerror_r() instead of GNU-specific

2012-07-23 Thread Ulrich Drepper
On Mon, Jul 23, 2012 at 11:00 AM, Kirill A. Shutemov kir...@shutemov.name wrote: The right way to fix it is to switch to XSI-compliant version. And why exactly would this be the right way? Just fix the use of strerror_r or use strerror_l. -- To unsubscribe from this list: send the line

Re: [PATCH 2/2] perf: use XSI-complaint version of strerror_r() instead of GNU-specific

2012-07-23 Thread Ulrich Drepper
On Mon, Jul 23, 2012 at 4:31 PM, Kirill A. Shutemov kir...@shutemov.name wrote: + const char *err = strerror_r(errnum, buf, buflen); + + if (err != buf buflen 0) { + size_t len = strlen(err); + char *c = mempcpy(buf,

Re: [PATCH 2/2] perf: use XSI-complaint version of strerror_r() instead of GNU-specific

2012-07-23 Thread Ulrich Drepper
On Mon, Jul 23, 2012 at 5:06 PM, Kirill A. Shutemov kir...@shutemov.name wrote: They are bugs. Let's fix strerror_r() usage. Signed-off-by: Kirill A. Shutemov kir...@shutemov.name Acked-by: Ulrich Drepper drep...@gmail.com -- To unsubscribe from this list: send the line unsubscribe linux

Re: [PATCHv3 0/3] perf tool: Add new event group management

2012-07-18 Thread Ulrich Drepper
On Wed, Jul 18, 2012 at 6:21 AM, Jiri Olsa wrote: > Well, I personally like the '{}' syntax more than '--group-events or > --group-reads > option in front', it feels more user friendly.. anyway, we can easily have > both ways. I like the actual visual grouping better, too. Also, it doesn't

Re: [PATCHv3 0/3] perf tool: Add new event group management

2012-07-18 Thread Ulrich Drepper
On Wed, Jul 18, 2012 at 6:21 AM, Jiri Olsa jo...@redhat.com wrote: Well, I personally like the '{}' syntax more than '--group-events or --group-reads option in front', it feels more user friendly.. anyway, we can easily have both ways. I like the actual visual grouping better, too. Also,

Re: [PATCH] RUSAGE_THREAD

2008-01-18 Thread Ulrich Drepper
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Roland McGrath wrote: > +#define RUSAGE_LWP RUSAGE_THREAD /* Solaris name for same */ No need to clutter the kernel header with this, it'll be in the libc header. Aside from that: Acked-by: Ulrich Drepper <[EMAIL PRO

Re: [PATCH] RUSAGE_THREAD

2008-01-18 Thread Ulrich Drepper
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Roland McGrath wrote: +#define RUSAGE_LWP RUSAGE_THREAD /* Solaris name for same */ No need to clutter the kernel header with this, it'll be in the libc header. Aside from that: Acked-by: Ulrich Drepper [EMAIL PROTECTED] - -- ➧ Ulrich

Re: [RFC] Per-thread getrusage

2008-01-17 Thread Ulrich Drepper
r is from a thread in the same process which would solve the security problem. - -- ➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖ -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (GNU/Linux) iD8DBQFHj3do2ijCOnn/RHQRAiKdAKCSooiEWcxr780hJGenElyDiWPWKgCdE+6Y j6ibmGsPT4aYxhSfpimSd

Re: [PATCHv4 5/6] Allow setting O_NONBLOCK flag for new sockets

2007-11-26 Thread Ulrich Drepper
s_indirect adds parameters" are not really contested. Yes, that's what sys_indirect does. So what? It does this with almost no cost which outweighs the ugliness factor in my book. - -- ➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖ -BEGIN PGP SIGNATURE- V

Re: [PATCHv4 5/6] Allow setting O_NONBLOCK flag for new sockets

2007-11-26 Thread Ulrich Drepper
y but it does it jobs, doesn't impact performance, and is expandable in direction we *know* we will want to go very soon. - -- ➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖ -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (GNU/Linux) Comment: Using Gnu

Re: [PATCHv4 5/6] Allow setting O_NONBLOCK flag for new sockets

2007-11-26 Thread Ulrich Drepper
, doesn't impact performance, and is expandable in direction we *know* we will want to go very soon. - -- ➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖ -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

Re: [PATCHv4 5/6] Allow setting O_NONBLOCK flag for new sockets

2007-11-26 Thread Ulrich Drepper
are not really contested. Yes, that's what sys_indirect does. So what? It does this with almost no cost which outweighs the ugliness factor in my book. - -- ➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖ -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (GNU/Linux) Comment

Re: [PATCHv5 4/5] Allow setting O_NONBLOCK flag for new sockets

2007-11-24 Thread Ulrich Drepper
On Nov 24, 2007 12:28 AM, Eric Dumazet <[EMAIL PROTECTED]> wrote: > OK, but maybe for consistency, we might accept the two mechanisms. It's not a question of the kernel interface. The issue with all these extensions is the userlevel interface. Ideally no new userlevel interface is needed. This

Re: [PATCHv5 4/5] Allow setting O_NONBLOCK flag for new sockets

2007-11-24 Thread Ulrich Drepper
On Nov 24, 2007 12:28 AM, Eric Dumazet [EMAIL PROTECTED] wrote: OK, but maybe for consistency, we might accept the two mechanisms. It's not a question of the kernel interface. The issue with all these extensions is the userlevel interface. Ideally no new userlevel interface is needed. This is

Re: [PATCHv5 4/5] Allow setting O_NONBLOCK flag for new sockets

2007-11-23 Thread Ulrich Drepper
es could you remind it to me ? No security issue. But look at any correct network program, all need to set the mode to non-blocking. Adding this support to the syscall comes at almost no cost and it cuts the cost for every program down by one or two syscalls. - -- ➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 4

Re: Where is the new timerfd?

2007-11-23 Thread Ulrich Drepper
On Nov 23, 2007 9:29 AM, Davide Libenzi <[EMAIL PROTECTED]> wrote: > Yes, it's disabled, and yes, I'll repost today ... I haven't seen the patch and don't feel like searching. So I say it here: please mak sure you add a flags parameter to the system call itself (instead of adding it on as for

Re: Where is the new timerfd?

2007-11-23 Thread Ulrich Drepper
On Nov 23, 2007 9:29 AM, Davide Libenzi [EMAIL PROTECTED] wrote: Yes, it's disabled, and yes, I'll repost today ... I haven't seen the patch and don't feel like searching. So I say it here: please mak sure you add a flags parameter to the system call itself (instead of adding it on as for

Re: [PATCHv5 4/5] Allow setting O_NONBLOCK flag for new sockets

2007-11-23 Thread Ulrich Drepper
it to me ? No security issue. But look at any correct network program, all need to set the mode to non-blocking. Adding this support to the syscall comes at almost no cost and it cuts the cost for every program down by one or two syscalls. - -- ➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St

[PATCHv5 1/5] actual sys_indirect code

2007-11-20 Thread Ulrich Drepper
This is the actual architecture-independent part of the system call implementation. include/linux/indirect.h | 17 + include/linux/sched.h|4 include/linux/syscalls.h |4 kernel/Makefile |3 +++ kernel/indirect.c| 40

[PATCHv5 0/5] sys_indirect system call

2007-11-20 Thread Ulrich Drepper
%s set\n", s3 == 0 ? "not" : "is"); close (fd); FILL_IN(r, __NR_eventfd, 8); fd = syscall (__NR_indirect, , , sizeof (i), 0); int s4 = fcntl (fd, F_GETFD); printf ("eventfd: FD_CLOEXEC %s set\n", s4 == 0 ? "not" : "is"); close

[PATCHv5 2/5] x86 support for sys_indirect

2007-11-20 Thread Ulrich Drepper
This part adds support for sys_indirect on x86 and x86-64. arch/x86/Kconfig |3 ++ arch/x86/ia32/Makefile |1 arch/x86/ia32/ia32entry.S |2 + arch/x86/ia32/sys_ia32.c | 38 +

[PATCHv5 3/5] Allow setting FD_CLOEXEC flag for new sockets

2007-11-20 Thread Ulrich Drepper
This is a first user of sys_indirect. Several of the socket-related system calls which produce a file handle now can be passed an additional parameter to set the FD_CLOEXEC flag. include/asm-x86/ia32_unistd.h |1 + include/linux/indirect.h | 27 +++

[PATCHv5 5/5] FD_CLOEXEC support for eventfd, signalfd, timerfd

2007-11-20 Thread Ulrich Drepper
This patch adds support to set the FD_CLOEXEC flag for the file descriptors returned by eventfd, signalfd, timerfd. fs/anon_inodes.c | 15 +++ fs/eventfd.c |5 +++-- fs/signalfd.c |6 -- fs/timerfd.c |6

[PATCHv5 4/5] Allow setting O_NONBLOCK flag for new sockets

2007-11-20 Thread Ulrich Drepper
This patch adds support for setting the O_NONBLOCK flag of the file descriptors returned by socket, socketpair, and accept. socket.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) --- linux/net/socket.c +++ linux/net/socket.c @@ -362,7 +362,7 @@ static int

Re: 2.6.24-rc3: find complains about /proc/net

2007-11-20 Thread Ulrich Drepper
antics seems to be more useful. So I guess, no change is the way to go here. - -- ➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖ -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iD8DBQF

Re: [PATCHv4 0/6] sys_indirect system call

2007-11-20 Thread Ulrich Drepper
erface is sufficiently prepared for this and that there is no need to wait adding this initial, synchronous syscall stuff before the syslet stuff is ready. These interface changes are security-relevant and should be added ASAP. - -- ➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖ -BEG

Re: [PATCHv4 4/6] Allow setting FD_CLOEXEC flag for new sockets

2007-11-20 Thread Ulrich Drepper
l members added to the structure can and should be neutral of the word size. We've done this with some syscalls already (like pread64) where we always use the wide form in the parameter list. It's just more simple here since it does not have to split into two 32-bit registers. - -- ➧ Ulrich Drep

Re: [PATCHv3 0/4] sys_indirect system call

2007-11-20 Thread Ulrich Drepper
nd that I explained this. I talked to Andrew and he favored new syscalls. But then I talked to Linus and he favored this approach. Probably especially because it can be used for syslets as well. And it is less code and data than introducing new syscalls. - -- ➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444

Re: [PATCHv4 2/6] x86 support for sys_indirect

2007-11-20 Thread Ulrich Drepper
number. That macro wasn't always available. I'll test it. - -- ➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖ -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (GNU/Linux) iD8DBQFHQwdg2ijCOnn/RHQRAmh9AJ9EuthsaoupSHn3kR/x0cWxqR3FoQCfSbmE 8RIDWzPKZ6cv+QVGNl0fawM= =ScgY -E

Re: [PATCHv4 0/6] sys_indirect system call

2007-11-20 Thread Ulrich Drepper
latter case an additional parameter might be needed to indicate the notification mechanism. > And no change in the test program reflecting this 'flags' new param, so > it fails. Yep, sorry, I didn't update the text by including the most recent test program. I'll do that for the next version.

Re: [PATCHv4 5/6] Allow setting O_NONBLOCK flag for new sockets

2007-11-20 Thread Ulrich Drepper
cro get defined? I do not > see it being defined anywhere in these patches. Defined in : +#define INDIRECT_PARAM(set, name) current->indirect_params.set.name Not my idea, I was following one review comment. - -- ➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖ ---

Re: [PATCHv4 5/6] Allow setting O_NONBLOCK flag for new sockets

2007-11-20 Thread Ulrich Drepper
not see it being defined anywhere in these patches. Defined in linux/indirect.h: +#define INDIRECT_PARAM(set, name) current-indirect_params.set.name Not my idea, I was following one review comment. - -- ➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖ -BEGIN PGP

Re: [PATCHv4 0/6] sys_indirect system call

2007-11-20 Thread Ulrich Drepper
might be needed to indicate the notification mechanism. And no change in the test program reflecting this 'flags' new param, so it fails. Yep, sorry, I didn't update the text by including the most recent test program. I'll do that for the next version. - -- ➧ Ulrich Drepper ➧ Red Hat, Inc

Re: [PATCHv3 0/4] sys_indirect system call

2007-11-20 Thread Ulrich Drepper
explained this. I talked to Andrew and he favored new syscalls. But then I talked to Linus and he favored this approach. Probably especially because it can be used for syslets as well. And it is less code and data than introducing new syscalls. - -- ➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St

Re: [PATCHv4 2/6] x86x86-64 support for sys_indirect

2007-11-20 Thread Ulrich Drepper
. That macro wasn't always available. I'll test it. - -- ➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖ -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (GNU/Linux) iD8DBQFHQwdg2ijCOnn/RHQRAmh9AJ9EuthsaoupSHn3kR/x0cWxqR3FoQCfSbmE 8RIDWzPKZ6cv+QVGNl0fawM= =ScgY -END PGP

Re: [PATCHv4 0/6] sys_indirect system call

2007-11-20 Thread Ulrich Drepper
prepared for this and that there is no need to wait adding this initial, synchronous syscall stuff before the syslet stuff is ready. These interface changes are security-relevant and should be added ASAP. - -- ➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖ -BEGIN PGP

Re: [PATCHv4 4/6] Allow setting FD_CLOEXEC flag for new sockets

2007-11-20 Thread Ulrich Drepper
added to the structure can and should be neutral of the word size. We've done this with some syscalls already (like pread64) where we always use the wide form in the parameter list. It's just more simple here since it does not have to split into two 32-bit registers. - -- ➧ Ulrich Drepper ➧ Red Hat

Re: 2.6.24-rc3: find complains about /proc/net

2007-11-20 Thread Ulrich Drepper
to be more useful. So I guess, no change is the way to go here. - -- ➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖ -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iD8DBQFHQ25/2ijCOnn

[PATCHv5 5/5] FD_CLOEXEC support for eventfd, signalfd, timerfd

2007-11-20 Thread Ulrich Drepper
This patch adds support to set the FD_CLOEXEC flag for the file descriptors returned by eventfd, signalfd, timerfd. fs/anon_inodes.c | 15 +++ fs/eventfd.c |5 +++-- fs/signalfd.c |6 -- fs/timerfd.c |6

[PATCHv5 4/5] Allow setting O_NONBLOCK flag for new sockets

2007-11-20 Thread Ulrich Drepper
This patch adds support for setting the O_NONBLOCK flag of the file descriptors returned by socket, socketpair, and accept. socket.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) --- linux/net/socket.c +++ linux/net/socket.c @@ -362,7 +362,7 @@ static int

[PATCHv5 3/5] Allow setting FD_CLOEXEC flag for new sockets

2007-11-20 Thread Ulrich Drepper
This is a first user of sys_indirect. Several of the socket-related system calls which produce a file handle now can be passed an additional parameter to set the FD_CLOEXEC flag. include/asm-x86/ia32_unistd.h |1 + include/linux/indirect.h | 27 +++

[PATCHv5 1/5] actual sys_indirect code

2007-11-20 Thread Ulrich Drepper
This is the actual architecture-independent part of the system call implementation. include/linux/indirect.h | 17 + include/linux/sched.h|4 include/linux/syscalls.h |4 kernel/Makefile |3 +++ kernel/indirect.c| 40

[PATCHv5 0/5] sys_indirect system call

2007-11-20 Thread Ulrich Drepper
; } Signed-off-by: Ulrich Drepper [EMAIL PROTECTED] arch/x86/Kconfig |3 ++ arch/x86/ia32/Makefile |1 arch/x86/ia32/ia32entry.S |2 + arch/x86/ia32/sys_ia32.c | 38 + arch/x86/kernel

[PATCHv5 2/5] x86x86-64 support for sys_indirect

2007-11-20 Thread Ulrich Drepper
This part adds support for sys_indirect on x86 and x86-64. arch/x86/Kconfig |3 ++ arch/x86/ia32/Makefile |1 arch/x86/ia32/ia32entry.S |2 + arch/x86/ia32/sys_ia32.c | 38 +

[PATCHv4 4/6] Allow setting FD_CLOEXEC flag for new sockets

2007-11-19 Thread Ulrich Drepper
This is a first user of sys_indirect. Several of the socket-related system calls which produce a file handle now can be passed an additional parameter to set the FD_CLOEXEC flag. arch/x86/ia32/Makefile|1 + arch/x86/ia32/sys_ia32.c |4 include/asm-x86/ia32_unistd.h |

[PATCHv4 1/6] actual sys_indirect code

2007-11-19 Thread Ulrich Drepper
This is the actual architecture-independent part of the system call implementation. include/linux/indirect.h |6 ++ include/linux/sched.h|4 include/linux/syscalls.h |4 kernel/Makefile |2 +- kernel/indirect.c| 36

[PATCHv4 5/6] Allow setting O_NONBLOCK flag for new sockets

2007-11-19 Thread Ulrich Drepper
This patch adds support for setting the O_NONBLOCK flag of the file descriptors returned by socket, socketpair, and accept. socket.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) --- net/socket.c +++ net/socket.c @@ -362,7 +362,7 @@ static int sock_alloc_fd(struct file

[PATCHv4 2/6] x86 support for sys_indirect

2007-11-19 Thread Ulrich Drepper
This part adds support for sys_indirect on x86 and x86-64. arch/x86/ia32/ia32entry.S |2 ++ arch/x86/ia32/sys_ia32.c | 31 +++ arch/x86/kernel/syscall_table_32.S |1 + include/asm-x86/indirect.h |5 +

[PATCHv4 3/6] UML support for sys_indirect

2007-11-19 Thread Ulrich Drepper
This part adds support for sys_indirect for UML. indirect.h |6 ++ 1 file changed, 6 insertions(+) --- /dev/null +++ include/asm-um/indirect.h @@ -0,0 +1,6 @@ +#ifndef __UM_INDIRECT_H +#define __UM_INDIRECT_H + +#include "asm/arch/indirect.h" + +#endif - To unsubscribe from this list:

[PATCHv4 0/6] sys_indirect system call

2007-11-19 Thread Ulrich Drepper
syscall (__NR_indirect, , , sizeof (i)); int s4 = fcntl (fd, F_GETFD); printf ("eventfd: FD_CLOEXEC %s set\n", s4 == 0 ? "not" : "is"); close (fd); return s1 != 0 || s2 == 0 || t1 != 0 || t2 == 0 || s3 == 0 || s4 == 0; } ~~

[PATCHv4 6/6] FD_CLOEXEC support for eventfd, signalfd, timerfd

2007-11-19 Thread Ulrich Drepper
This patch adds support to set the FD_CLOEXEC flag for the file descriptors returned by eventfd, signalfd, timerfd. fs/anon_inodes.c | 15 +++ fs/eventfd.c |5 +++-- fs/signalfd.c |6 -- fs/timerfd.c |6

Re: [PATCHv3 0/4] sys_indirect system call

2007-11-19 Thread Ulrich Drepper
r. Plus, using sys_indirect could in future be used to transport entire parameters (like a sigset_t) along with other information, thereby saving individual copy operations. I think the sys_indirect approach is the way forward. I'll submit a last version of the patch in a bit. - -- ➧ Ulrich Drepper ➧ Red

Re: [PATCHv3 0/4] sys_indirect system call

2007-11-19 Thread Ulrich Drepper
that user programs should never use this syscall directly (just like don't for existing ones). I see no problem at all here. - -- ➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖ -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (GNU/Linux) i

Re: [PATCHv3 0/4] sys_indirect system call

2007-11-19 Thread Ulrich Drepper
the substructs for each function. There is no overhead introduced through the union. The only reason the union is there in the first place is to allocate sufficient data in task_struct to cover all cases. - -- ➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖ -BEGIN PGP SIGNATUR

Re: [PATCHv3 0/4] sys_indirect system call

2007-11-19 Thread Ulrich Drepper
. There is no overhead introduced through the union. The only reason the union is there in the first place is to allocate sufficient data in task_struct to cover all cases. - -- ➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖ -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (GNU/Linux

Re: [PATCHv3 0/4] sys_indirect system call

2007-11-19 Thread Ulrich Drepper
never use this syscall directly (just like don't for existing ones). I see no problem at all here. - -- ➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖ -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (GNU/Linux) iD8DBQFHQbBH2ijCOnn

Re: [PATCHv3 0/4] sys_indirect system call

2007-11-19 Thread Ulrich Drepper
could in future be used to transport entire parameters (like a sigset_t) along with other information, thereby saving individual copy operations. I think the sys_indirect approach is the way forward. I'll submit a last version of the patch in a bit. - -- ➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro

[PATCHv4 4/6] Allow setting FD_CLOEXEC flag for new sockets

2007-11-19 Thread Ulrich Drepper
This is a first user of sys_indirect. Several of the socket-related system calls which produce a file handle now can be passed an additional parameter to set the FD_CLOEXEC flag. arch/x86/ia32/Makefile|1 + arch/x86/ia32/sys_ia32.c |4 include/asm-x86/ia32_unistd.h |

[PATCHv4 1/6] actual sys_indirect code

2007-11-19 Thread Ulrich Drepper
This is the actual architecture-independent part of the system call implementation. include/linux/indirect.h |6 ++ include/linux/sched.h|4 include/linux/syscalls.h |4 kernel/Makefile |2 +- kernel/indirect.c| 36

[PATCHv4 3/6] UML support for sys_indirect

2007-11-19 Thread Ulrich Drepper
This part adds support for sys_indirect for UML. indirect.h |6 ++ 1 file changed, 6 insertions(+) --- /dev/null +++ include/asm-um/indirect.h @@ -0,0 +1,6 @@ +#ifndef __UM_INDIRECT_H +#define __UM_INDIRECT_H + +#include asm/arch/indirect.h + +#endif - To unsubscribe from this list:

[PATCHv4 2/6] x86x86-64 support for sys_indirect

2007-11-19 Thread Ulrich Drepper
This part adds support for sys_indirect on x86 and x86-64. arch/x86/ia32/ia32entry.S |2 ++ arch/x86/ia32/sys_ia32.c | 31 +++ arch/x86/kernel/syscall_table_32.S |1 + include/asm-x86/indirect.h |5 +

[PATCHv4 0/6] sys_indirect system call

2007-11-19 Thread Ulrich Drepper
: FD_CLOEXEC %s set\n, s4 == 0 ? not : is); close (fd); return s1 != 0 || s2 == 0 || t1 != 0 || t2 == 0 || s3 == 0 || s4 == 0; } Signed-off-by: Ulrich Drepper [EMAIL PROTECTED] arch/x86/ia32/Makefile |1

[PATCHv4 6/6] FD_CLOEXEC support for eventfd, signalfd, timerfd

2007-11-19 Thread Ulrich Drepper
This patch adds support to set the FD_CLOEXEC flag for the file descriptors returned by eventfd, signalfd, timerfd. fs/anon_inodes.c | 15 +++ fs/eventfd.c |5 +++-- fs/signalfd.c |6 -- fs/timerfd.c |6

[PATCHv4 5/6] Allow setting O_NONBLOCK flag for new sockets

2007-11-19 Thread Ulrich Drepper
This patch adds support for setting the O_NONBLOCK flag of the file descriptors returned by socket, socketpair, and accept. socket.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) --- net/socket.c +++ net/socket.c @@ -362,7 +362,7 @@ static int sock_alloc_fd(struct file

Re: [PATCHv3 0/4] sys_indirect system call

2007-11-18 Thread Ulrich Drepper
Overhead is only paid if you really need it which is rarely the case. Plus, you might have heard Linus and Zack talk about syslets again. Starting syslets can be done using the same interface, I guess. - -- ➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖ -BEGIN PGP

Re: [PATCHv3 0/4] sys_indirect system call

2007-11-18 Thread Ulrich Drepper
is only paid if you really need it which is rarely the case. Plus, you might have heard Linus and Zack talk about syslets again. Starting syslets can be done using the same interface, I guess. - -- ➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖ -BEGIN PGP SIGNATURE

Re: [PATCH 0/4] sys_indirect system call

2007-11-17 Thread Ulrich Drepper
in the v3 patch. This should allow you to add additional functionality like syslets later. Currently a zero value is enforced. In future nonzero values could also imply that the function takes additional parameters. - -- ➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖ -

Re: [PATCH 0/4] sys_indirect system call

2007-11-17 Thread Ulrich Drepper
. This should allow you to add additional functionality like syslets later. Currently a zero value is enforced. In future nonzero values could also imply that the function takes additional parameters. - -- ➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖ -BEGIN PGP

[PATCHv3 0/4] sys_indirect system call

2007-11-16 Thread Ulrich Drepper
ot" : "is"); close (fd); return s1 != 0 || s2 == 0; } ~~~~~~~~~~~~ Signed-off-by: Ulrich Drepper <[EMAIL PROTECTED]> arch/x86/ia32/Makefile |1 arch/x86/ia32/ia32entry.S |2 + arch/x86/ia32/sys_ia32.c | 37 ++

[PATCHv3 3/4] UML support for sys_indirect

2007-11-16 Thread Ulrich Drepper
This part adds support for sys_indirect for UML. indirect.h |6 ++ 1 file changed, 6 insertions(+) --- /dev/null +++ include/asm-um/indirect.h @@ -0,0 +1,6 @@ +#ifndef __UM_INDIRECT_H +#define __UM_INDIRECT_H + +#include "asm/arch/indirect.h" + +#endif - To unsubscribe from this list:

[PATCHv3 2/4] x86 support for sys_indirect

2007-11-16 Thread Ulrich Drepper
This part adds support for sys_indirect on x86 and x86-64. arch/x86/ia32/ia32entry.S |2 ++ arch/x86/ia32/sys_ia32.c | 31 +++ arch/x86/kernel/syscall_table_32.S |1 + include/asm-x86/indirect.h |5 +

[PATCHv3 4/4] first use of sys_indirect system call

2007-11-16 Thread Ulrich Drepper
This is a first user of sys_indirect. Several of the socket-related system calls which produce a file handle now can be passed an additional parameter to set the FD_CLOEXEC flag. arch/x86/ia32/Makefile|1 + arch/x86/ia32/sys_ia32.c |4 include/asm-x86/ia32_unistd.h |

[PATCHv3 1/4] actual sys_indirect code

2007-11-16 Thread Ulrich Drepper
This is the actual architecture-independent part of the system call implementation. include/linux/indirect.h |6 ++ include/linux/sched.h|4 include/linux/syscalls.h |4 kernel/Makefile |2 +- kernel/indirect.c| 36

Re: [PATCHv2 4/4] first use of sys_indirect system call

2007-11-16 Thread Ulrich Drepper
them to some good news after all. - -- ➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖ -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iD8DBQFHPeim2ijCOnn/RHQRAu8xAJsF/0Ir1PWMbHkVRaI5vKOG

Re: [PATCHv2 4/4] first use of sys_indirect system call

2007-11-16 Thread Ulrich Drepper
ntimes/libraries can say something like that. Library writers don't have the luxury of being able to modify any global state. This has all been discussed here before. - -- ➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖ -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (GNU

Re: [PATCHv2 4/4] first use of sys_indirect system call

2007-11-16 Thread Ulrich Drepper
/libraries can say something like that. Library writers don't have the luxury of being able to modify any global state. This has all been discussed here before. - -- ➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖ -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (GNU/Linux

Re: [PATCHv2 4/4] first use of sys_indirect system call

2007-11-16 Thread Ulrich Drepper
good news after all. - -- ➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖ -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iD8DBQFHPeim2ijCOnn/RHQRAu8xAJsF/0Ir1PWMbHkVRaI5vKOGFS4tMACfVEs9 pMYAiCAU1E2B

[PATCHv3 1/4] actual sys_indirect code

2007-11-16 Thread Ulrich Drepper
This is the actual architecture-independent part of the system call implementation. include/linux/indirect.h |6 ++ include/linux/sched.h|4 include/linux/syscalls.h |4 kernel/Makefile |2 +- kernel/indirect.c| 36

[PATCHv3 4/4] first use of sys_indirect system call

2007-11-16 Thread Ulrich Drepper
This is a first user of sys_indirect. Several of the socket-related system calls which produce a file handle now can be passed an additional parameter to set the FD_CLOEXEC flag. arch/x86/ia32/Makefile|1 + arch/x86/ia32/sys_ia32.c |4 include/asm-x86/ia32_unistd.h |

  1   2   3   4   5   6   7   8   >