9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: moody@posixcafe.org
To: 9fans <9fans@9fans.net>
Subject: Re: [9fans] openat()
Date: Sat, 6 Apr 2024 16:51:49 -0400	[thread overview]
Message-ID: <17124367090.cDf02.77195@composer.9fans.topicbox.com> (raw)
In-Reply-To: <17124314640.ceA1.70581@composer.9fans.topicbox.com>

[-- Attachment #1: Type: text/plain, Size: 1939 bytes --]

In response to Ron's mail. Still can not reply from my mail server.

I still don't quite understand what you are getting at.

I was focusing up on the linux interface (ie openat(int fd, char *path, int flags, ...)) mapping of open fd to path. I see now as well that openat specifies that the argument must be a fd to a directory , so the issue of walk not being able to use files is not relevant, but you still have the other walk(5) limitations on the source fid.

If you are instead just wanting something that has the interface of: openat(char *dir, char *file, mode) for the purpose of avoiding just the cd than open as you say. Than I don't see why you couldn't usually just combine the open path yourself before handing it to the kernel.

If we put aside the interface and just focus on it's ability to act as a method to cache a walk for reuse with multiple subsequent open's let's say than I still think the design of 9p gets in the way. The difference between walking first then being able to reuse the fid for further walks, and just always walking from the root is however many path elements being walked internally to the 9p server. So I imagine that the overhead of doing this partial walk first, pinging to the 9p server and back to userspace would only be cheaper if you were opening quite a large amount of files. Is that what you were getting at Ron?

In response to Bakul:

I don't think it's just an easy win at all. As mentioned already the act of getting whatever handle you choose from the 9p server and back to userspace as a method of reuse to prevent a couple of internal walks within the 9p server I think are not going to be favorable in performance.

Thanks,
moody


------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T675e737e776e5a9c-M3c21a5ee93f83ca1650b537c
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

[-- Attachment #2: Type: text/html, Size: 2843 bytes --]

  reply	other threads:[~2024-04-06 20:51 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-05 19:50 ron minnich
2024-04-05 20:12 ` Gorka Guardiola
2024-04-05 20:15   ` Gorka Guardiola
2024-04-05 20:36     ` Gorka Guardiola
2024-04-05 21:22       ` ron minnich
2024-04-05 21:43         ` Bakul Shah via 9fans
2024-04-05 21:49         ` Alyssa M via 9fans
2024-04-05 22:29           ` Gorka Guardiola
2024-04-06  3:18             ` moody
2024-04-06 17:35               ` ron minnich
2024-04-06 19:23                 ` David Leimbach via 9fans
2024-04-06 19:54                 ` Bakul Shah via 9fans
2024-04-06 19:24               ` Alyssa M via 9fans
2024-04-06 20:51                 ` moody [this message]
2024-04-07  1:36                   ` Alyssa M via 9fans
2024-04-07 15:00                     ` Alyssa M via 9fans
2024-04-10 12:17                       ` wb.kloke

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=17124367090.cDf02.77195@composer.9fans.topicbox.com \
    --to=moody@posixcafe.org \
    --cc=9fans@9fans.net \
    /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;
as well as URLs for NNTP newsgroup(s).