linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Bijan Mottahedeh <bijan.mottahedeh@oracle.com>
Cc: io-uring@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH v2 0/4] io_uring: call statx directly
Date: Tue, 26 May 2020 16:59:23 -0600	[thread overview]
Message-ID: <f00063b9-7926-9739-f599-603cdf052161@kernel.dk> (raw)
In-Reply-To: <1590208279-33811-1-git-send-email-bijan.mottahedeh@oracle.com>

On 5/22/20 10:31 PM, Bijan Mottahedeh wrote:
> v1 -> v2
> 
> - Separate statx and open in io_kiocb 
> - Remove external declarations for unused statx interfaces
> 
> This patch set is a fix for the liburing statx test failure.
> 
> The test fails with a "Miscompare between io_uring and statx" error
> because the statx system call path has additional processing in vfs_statx():
> 
>         stat->result_mask |= STATX_MNT_ID;
>         if (path.mnt->mnt_root == path.dentry)
>                 stat->attributes |= STATX_ATTR_MOUNT_ROOT;
>         stat->attributes_mask |= STATX_ATTR_MOUNT_ROOT;
> 
> which then results in different result_mask values.
> 
> Allowing the system call to be invoked directly simplifies the io_uring
> interface and avoids potential future incompatibilities.  I'm not sure
> if there was other reasoning fort not doing so initially.
> 
> One issue I cannot account for is the difference in "used" memory reported
> by free(1) after running the statx a large (10000) number of times.
> 
> The difference is significant ~100k and doesn't really change after
> dropping caches.
> 
> I enabled memory leak detection and couldn't see anything related to the test.
> 
> Bijan Mottahedeh (4):
>   io_uring: add io_statx structure
>   statx: allow system call to be invoked from io_uring
>   io_uring: call statx directly
>   statx: hide interfaces no longer used by io_uring
> 
>  fs/internal.h |  4 ++--
>  fs/io_uring.c | 72 +++++++++++++++--------------------------------------------
>  fs/stat.c     | 37 +++++++++++++++++-------------
>  3 files changed, 42 insertions(+), 71 deletions(-)

Thanks, this looks better. For a bit of history, the initial attempt was
to do the statx without async offload if we could do so without blocking.
Without that, we may as well simplify it.

-- 
Jens Axboe


  parent reply	other threads:[~2020-05-26 22:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-23  4:31 [PATCH v2 0/4] io_uring: call statx directly Bijan Mottahedeh
2020-05-23  4:31 ` [PATCH v2 1/4] io_uring: add io_statx structure Bijan Mottahedeh
2020-05-23  4:31 ` [PATCH v2 2/4] statx: allow system call to be invoked from io_uring Bijan Mottahedeh
2020-05-23  4:31 ` [PATCH v2 3/4] io_uring: call statx directly Bijan Mottahedeh
2020-05-23  4:31 ` [PATCH v2 4/4] statx: hide interfaces no longer used by io_uring Bijan Mottahedeh
2020-05-26 22:59 ` Jens Axboe [this message]
2020-05-26 23:39   ` [PATCH v2 0/4] io_uring: call statx directly Clay Harris

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=f00063b9-7926-9739-f599-603cdf052161@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=bijan.mottahedeh@oracle.com \
    --cc=io-uring@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).