From: Christoph Hellwig <hch@lst.de>
To: Philippe Liard <pliard@google.com>
Cc: phillip@squashfs.org.uk, hch@lst.de,
linux-kernel@vger.kernel.org, groeck@chromium.org
Subject: Re: [PATCH] squashfs: Migrate from ll_rw_block usage to BIO
Date: Wed, 30 Oct 2019 15:01:44 +0100 [thread overview]
Message-ID: <20191030140144.GA14098@lst.de> (raw)
In-Reply-To: <20191030011954.60006-1-pliard@google.com>
On Wed, Oct 30, 2019 at 10:19:54AM +0900, Philippe Liard wrote:
> > What access do you need to synchronize? If you read data into the
> > page cache the page lock provides all synchronization needed. If
> > you just read into decrompression buffers there probably is no need
> > for synchronization at all as each buffer is only accessed by one
> > thread at a time.
> My main concern here was waiting for the BIO request to complete but
> submit_bio_wait() that you pointed out below should address that.
Note that if you are doing multiple bios for a single request using
submit_bio_wait might not be optimal. In that case you probably want
a refcount and only complete when all of them are done, but by looking
at submit_bio_wait should get an idea how that works. Alternatively look
at others users, e.g. __blkdev_direct_IO in fs/block_dev.c that already
support multiple bios.
prev parent reply other threads:[~2019-10-30 14:01 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-18 1:08 [PATCH] squashfs: Migrate from ll_rw_block usage to BIO Philippe Liard
2019-10-18 16:32 ` Christoph Hellwig
2019-10-24 1:23 ` Philippe Liard
2019-10-24 5:41 ` Gao Xiang
2019-10-25 0:45 ` Philippe Liard
2019-10-25 2:53 ` Gao Xiang
[not found] ` <CABXOdTeQTapfvKqGrqZME8JACeJhaHram_ZWk7ZZX2VWvYORaw@mail.gmail.com>
2019-10-25 3:12 ` Gao Xiang
2019-10-29 4:10 ` Philippe Liard
2019-10-29 7:49 ` Christoph Hellwig
2019-10-30 1:19 ` Philippe Liard
2019-10-30 14:01 ` Christoph Hellwig [this message]
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=20191030140144.GA14098@lst.de \
--to=hch@lst.de \
--cc=groeck@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=phillip@squashfs.org.uk \
--cc=pliard@google.com \
/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