From: Ingo Molnar <mingo@elte.hu>
To: Davide Libenzi <davidel@xmailserver.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
Andrew Morton <akpm@linux-foundation.org>,
Ulrich Drepper <drepper@redhat.com>
Subject: Re: [patch 2/2] ufd v1 - use unsequential O(1) fdmap
Date: Sun, 3 Jun 2007 08:43:22 +0200 [thread overview]
Message-ID: <20070603064322.GA12576@elte.hu> (raw)
In-Reply-To: <send-serie.davidel@xmailserver.org.24319.1180825146.2>
* Davide Libenzi <davidel@xmailserver.org> wrote:
> This patch plugs the extended fdmap into the kernel. At the moment, this
> is done only through sys_dup2() and F_DUPFD.
> The base value for the unsequential file descriptor allocation is (at the
> moment) set to FD_UNSEQ_BASE (defined in asm-generic/fcntl.h):
really nice stuff! :-)
> #define FD_UNSEQ_BASE (1U << 28)
> #define FD_UNSEQ_ALLOC (1U << 30)
i'm wondering, why not use (1 << 30) both as the base and as the flag?
That would make integration of the new fd space 'seemless' in terms of
dup2() use.
> It'd be possible to add a new O_UNSEQFD flag to open(2) and make
> sys_open() to allocate the new descriptor inside the unsequential map.
yeah, please do that now - lets not leave any incomplete areas. We've
too often made the mistake of not pushing through new APIs consistently
enough.
I'd also suggest a new sys_socket2() call that takes a 'flags' parameter
as well - because one primary user of this facility will be networking
servers. (O_UNSEQFD would make sense for it and O_NDELAY - currently
network apps that want to set O_NDELAY need to do it with an extra
fcntl() - while they could already indicate this in the sys_socket()
call, if it were closer to sys_open() semantics)
in any case, your patch is looking really good and already deserves an
ack!
Acked-by: Ingo Molnar <mingo@elte.hu>
Ingo
next prev parent reply other threads:[~2007-06-03 6:43 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-02 22:59 [patch 2/2] ufd v1 - use unsequential O(1) fdmap Davide Libenzi
2007-06-03 6:43 ` Ingo Molnar [this message]
2007-06-03 18:22 ` Davide Libenzi
2007-06-03 18:20 ` Ulrich Drepper
2007-06-03 18:53 ` Davide Libenzi
2007-06-03 19:43 ` Ulrich Drepper
2007-06-03 20:19 ` Davide Libenzi
2007-06-03 20:46 ` Ulrich Drepper
2007-06-03 23:01 ` Davide Libenzi
2007-06-03 23:09 ` Ulrich Drepper
2007-06-03 23:32 ` Davide Libenzi
2007-06-04 5:11 ` Linus Torvalds
2007-06-04 5:22 ` Ulrich Drepper
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070603064322.GA12576@elte.hu \
--to=mingo@elte.hu \
--cc=akpm@linux-foundation.org \
--cc=davidel@xmailserver.org \
--cc=drepper@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.