All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Christoph Hellwig <hch@infradead.org>,
	"Darrick J. Wong" <djwong@kernel.org>
Cc: Miklos Szeredi <miklos@szeredi.hu>,
	Bernd Schubert <bschubert@ddn.com>,
	io-uring@vger.kernel.org, linux-ext4@vger.kernel.org,
	linux-fsdevel@vger.kernel.org, linux-xfs@vger.kernel.org,
	dsingh@ddn.com
Subject: Re: [PATCH 1/2] fs: add FMODE_DIO_PARALLEL_WRITE flag
Date: Tue, 18 Apr 2023 19:29:50 -0600	[thread overview]
Message-ID: <74244cb8-abf5-b559-5e9f-24d39c801855@kernel.dk> (raw)
In-Reply-To: <ZDuNqQgpHUw+gi9G@infradead.org>

On 4/15/23 11:54?PM, Christoph Hellwig wrote:
> On Fri, Apr 14, 2023 at 08:36:12AM -0700, Darrick J. Wong wrote:
>> IIUC uring wants to avoid the situation where someone sends 300 writes
>> to the same file, all of which end up in background workers, and all of
>> which then contend on exclusive i_rwsem.  Hence it has some hashing
>> scheme that executes io requests serially if they hash to the same value
>> (which iirc is the inode number?) to prevent resource waste.
>>
>> This flag turns off that hashing behavior on the assumption that each of
>> those 300 writes won't serialize on the other 299 writes, hence it's ok
>> to start up 300 workers.
>>
>> (apologies for precoffee garbled response)
> 
> It might be useful if someone (Jens?) could clearly document the
> assumptions for this flag.

I guess it can be summed up as the common case should not be using
exclusive (per file/inode) locking. If file extensions need exclusive
locking that's less of a concern, as I don't think it's unreasonable to
expect that to require stricter locking.

-- 
Jens Axboe


  reply	other threads:[~2023-04-19  1:29 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-07 17:20 [PATCHSET for-next 0/2] Flag file systems as supporting parallel dio writes Jens Axboe
2023-03-07 17:20 ` [PATCH 1/2] fs: add FMODE_DIO_PARALLEL_WRITE flag Jens Axboe
2023-04-12 13:40   ` Bernd Schubert
2023-04-12 13:43     ` Bernd Schubert
2023-04-13  7:40     ` Miklos Szeredi
2023-04-13  9:25       ` Bernd Schubert
2023-04-14  5:11       ` Christoph Hellwig
2023-04-14 15:36         ` Darrick J. Wong
2023-04-15 13:15           ` Jens Axboe
2023-04-18 12:42             ` Miklos Szeredi
2023-04-18 12:55               ` Bernd Schubert
2023-04-18 22:13                 ` Dave Chinner
2023-04-19  1:28                   ` Jens Axboe
2023-04-16  5:54           ` Christoph Hellwig
2023-04-19  1:29             ` Jens Axboe [this message]
2023-03-07 17:20 ` [PATCH 2/2] io_uring: avoid hashing O_DIRECT writes if the filesystem doesn't need it Jens Axboe
2023-03-15 17:40 ` [PATCHSET for-next 0/2] Flag file systems as supporting parallel dio writes Jens Axboe
2023-03-16  4:29   ` Darrick J. Wong
2023-03-17  2:53     ` Jens Axboe
2023-04-03 12:24 ` Christian Brauner

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=74244cb8-abf5-b559-5e9f-24d39c801855@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=bschubert@ddn.com \
    --cc=djwong@kernel.org \
    --cc=dsingh@ddn.com \
    --cc=hch@infradead.org \
    --cc=io-uring@vger.kernel.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    /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.