public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Nicholas Miell <nmiell@comcast.net>
To: dean gaudet <dean-list-linux-kernel@arctic.org>
Cc: Ulrich Drepper <drepper@redhat.com>,
	Linux Kernel <linux-kernel@vger.kernel.org>,
	Linus Torvalds <torvalds@osdl.org>
Subject: Re: openat()
Date: Wed, 09 Nov 2005 13:55:33 -0800	[thread overview]
Message-ID: <1131573333.2856.4.camel@entropy> (raw)
In-Reply-To: <Pine.LNX.4.63.0511091338200.728@twinlark.arctic.org>

On Wed, 2005-11-09 at 13:42 -0800, dean gaudet wrote:
> On Wed, 9 Nov 2005, Ulrich Drepper wrote:
> 
> > Can we please get the openat() syscall implemented?  I know Linus already
> > declared this is a good idea and I can only stress that it is really essential
> > for some things.  It is today impossible to write correct code which uses long
> > pathnames since all these operations would require the use of chdir() which
> > affect the whole POSIX process and not just one thread.  In addition we have
> > the reduction of race conditions.
> 
> oh sweet i've always wanted this for perf improvements in multithreaded 
> programs which have to deal with lots of lookups deep in a directory tree 
> (especially over NFS).
> 
> would this include other related syscalls such as link, unlink, rename, 
> chown, chmod... so that the the virtualization of the "current working 
> directory" concept is more complete?
> 
> -dean

I think that the full suite of "pathname lookups relative to a fd"
functions was implied.

Note that you could always introduce pthread_attr_setsharedfs(3) and
pthread_attr_getsharedfs(3) (or whatever you want to call them) which
control the passing of CLONE_FS to clone(2) in pthread_create(). This
would allow you to create threads which have their own pwd and umask
(and even chroot, but I don't think that would be very useful) without
any kernel changes.

-- 
Nicholas Miell <nmiell@comcast.net>


  reply	other threads:[~2005-11-09 21:55 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-09 19:14 openat() Ulrich Drepper
2005-11-09 21:03 ` openat() Miklos Szeredi
2005-11-09 21:27   ` openat() Ulrich Drepper
2005-11-27 22:06   ` another reason to add openat in the kernel: efficiency Jim Meyering
2005-11-09 21:42 ` openat() dean gaudet
2005-11-09 21:55   ` Nicholas Miell [this message]
2005-11-10  7:40   ` openat() Jeff Garzik
2005-11-10  7:48     ` openat() Ulrich Drepper
2005-11-10 10:01     ` openat() Jeff Garzik

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=1131573333.2856.4.camel@entropy \
    --to=nmiell@comcast.net \
    --cc=dean-list-linux-kernel@arctic.org \
    --cc=drepper@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox