public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Hannes Reinecke <hare@suse.de>
Cc: Kundan Kumar <kundan.kumar@samsung.com>,
	axboe@kernel.dk, hch@lst.de, willy@infradead.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 v2] block : add larger order folio size instead of pages
Date: Thu, 2 May 2024 14:53:40 +0200	[thread overview]
Message-ID: <20240502125340.GB20610@lst.de> (raw)
In-Reply-To: <317ce09b-5fec-4ed2-b32c-d098767956d0@suse.de>

On Thu, May 02, 2024 at 08:45:33AM +0200, Hannes Reinecke wrote:
>> -		nr_pages = (fi.offset + fi.length - 1) / PAGE_SIZE -
>> -			   fi.offset / PAGE_SIZE + 1;
>> -		do {
>> -			bio_release_page(bio, page++);
>> -		} while (--nr_pages != 0);
>> +		bio_release_page(bio, page);
>
> Errm. I guess you need to call 'folio_put()' here, otherwise the page 
> reference counting will be messed up.

It shouldn't.  See the rfc patch and explanation that Keith sent in reply
to the previous version.  But as I wrote earlier it should be a separate
prep patch including a commit log clearly explaining the reason for it
and how it works.

> That is not a valid conversion.
> bvec_try_to_merge_pages() will try to merge a page with an existing
> bvec. If the logic is switch to folios you would need to iterate over
> all pages in a folio, and call bvec_try_to_merge_pages() for each page
> in the folio.
> Or convert / add a function 'bvec_try_to_merge_folio()'.
> But with the above patch it will only ever try to merge the first page
> in the folio.

You mean bvec_try_merge_page?  The only place where it uses more
informtation than just the physical address is for the same_page
logic.  That beeing said converting it to a folio would still be
a good idea and a good prep patch.


  parent reply	other threads:[~2024-05-02 12:53 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20240430175735epcas5p103ac74e1482eda3e393c0034cea8e9ff@epcas5p1.samsung.com>
2024-04-30 17:50 ` [PATCH v2] block : add larger order folio size instead of pages Kundan Kumar
2024-05-02  5:35   ` Christoph Hellwig
2024-05-07 11:19     ` Kundan Kumar
2024-05-02  6:45   ` Hannes Reinecke
2024-05-02 11:52     ` Kundan Kumar
2024-05-02 12:53     ` Christoph Hellwig [this message]
2024-05-03 15:26       ` [PATCH v2] " Matthew Wilcox
2024-05-03 16:22         ` Christoph Hellwig
2024-05-04 12:35         ` Hannes Reinecke
2024-05-04 16:32           ` Matthew Wilcox
2024-05-05 12:10             ` Hannes Reinecke

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=20240502125340.GB20610@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=hare@suse.de \
    --cc=joshi.k@samsung.com \
    --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