linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Matthew Wilcox <willy@infradead.org>
Cc: Kundan Kumar <kundan.kumar@samsung.com>,
	axboe@kernel.dk, hch@lst.de, kbusch@kernel.org,
	linux-block@vger.kernel.org, joshi.k@samsung.com,
	mcgrof@kernel.org, anuj20.g@samsung.com, nj.shetty@samsung.com,
	c.gameti@samsung.com, gost.dev@samsung.com
Subject: Re: [PATCH v4 1/2] block: add folio awareness instead of looping through pages
Date: Thu, 6 Jun 2024 06:54:32 +0200	[thread overview]
Message-ID: <20240606045432.GE8395@lst.de> (raw)
In-Reply-To: <ZmCyQwCtvgolgkcz@casper.infradead.org>

On Wed, Jun 05, 2024 at 07:45:23PM +0100, Matthew Wilcox wrote:
> >  	if (bio->bi_vcnt > 0 &&
> >  	    bvec_try_merge_page(&bio->bi_io_vec[bio->bi_vcnt - 1],
> > -				page, len, offset, &same_page)) {
> > +				&folio->page, len, offset, &same_page)) {
> 
> Let's make that folio_page(folio, 0)

Or just pass a folio to bvec_try_merge_page (and rename it) if we want
to go all the way, but given that that will go down quite a bit
into xen and zone device code maybe that's not worth it for now as
we should eventually just convert it to a plain phys_addr_t anyway.

> >  	struct request_queue *q = bdev_get_queue(bio->bi_bdev);
> >  	bool same_page = false;
> >  
> > -	if (bio_add_hw_page(q, bio, page, len, offset,
> > +	if (bio_add_hw_page(q, bio, &folio->page, len, offset,
> 
> Likewise.

OTOH replacing / augmenting bio_add_hw_page with a bio_add_hw_folio
should be worthwhile, so I'd love to see that as a prep patch.


  reply	other threads:[~2024-06-06  4:54 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20240605093220epcas5p18c9f9d8fe89f53f91f7c1c2464b07a65@epcas5p1.samsung.com>
2024-06-05  9:24 ` [PATCH v4 0/2] block: add larger order folio instead of pages Kundan Kumar
2024-06-05  9:24   ` [PATCH v4 1/2] block: add folio awareness instead of looping through pages Kundan Kumar
2024-06-05 18:45     ` Matthew Wilcox
2024-06-06  4:54       ` Christoph Hellwig [this message]
2024-06-05 21:23     ` Matthew Wilcox
2024-06-06  4:56     ` Christoph Hellwig
2024-06-10  9:26       ` Kundan Kumar
2024-06-11 13:50     ` kernel test robot
2024-06-05  9:24   ` [PATCH v4 2/2] block: unpin user pages belonging to a folio Kundan Kumar
2024-06-05 21:22     ` Matthew Wilcox
2024-06-06  4:58       ` Christoph Hellwig

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=20240606045432.GE8395@lst.de \
    --to=hch@lst.de \
    --cc=anuj20.g@samsung.com \
    --cc=axboe@kernel.dk \
    --cc=c.gameti@samsung.com \
    --cc=gost.dev@samsung.com \
    --cc=joshi.k@samsung.com \
    --cc=kbusch@kernel.org \
    --cc=kundan.kumar@samsung.com \
    --cc=linux-block@vger.kernel.org \
    --cc=mcgrof@kernel.org \
    --cc=nj.shetty@samsung.com \
    --cc=willy@infradead.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).