Linux-mm Archive mirror
 help / color / mirror / Atom feed
From: "Mika Penttilä" <mpenttil@redhat.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	Alistair Popple <apopple@nvidia.com>,
	John Hubbard <jhubbard@nvidia.com>,
	Ralph Campbell <rcampbell@nvidia.com>,
	"Huang, Ying" <ying.huang@intel.com>
Subject: Re: [PATCH v3] mm/migrate_device: Try to handle swapcache pages
Date: Wed, 7 Jun 2023 18:56:18 +0300	[thread overview]
Message-ID: <43460b82-06c0-dfca-1cfd-d99208e2c647@redhat.com> (raw)
In-Reply-To: <ZICPx7RU0Qzh5zQY@infradead.org>

Hi,


On 7.6.2023 17.10, Christoph Hellwig wrote:
> On Tue, Jun 06, 2023 at 08:01:49AM +0300, mpenttil@redhat.com wrote:
>> From: Mika Penttilä <mpenttil@redhat.com>
>>
>> Migrating file pages and swapcache pages into device memory is not supported.
>> The decision is done based on page_mapping(). For now, swapcache pages are not migrated.
> 
> Please fix the commit log formatting, it should not exceed 7 lines.
> 
>>   		if (is_device_private_page(newpage) ||
>>   		    is_device_coherent_page(newpage)) {
>> -			/*
>> -			 * For now only support anonymous memory migrating to
>> -			 * device private or coherent memory.
>> -			 */
>> +
>>   			if (mapping) {
> 
> Very nitpicky, but this empty line looks odd.  Also isn't the comment
> still (mostly) correct given that file backed memory is still not
> supported?

Yes the comment is mostly correct and moved a few lines lower, 
complemented with a comment about the swap cache.

> 
>> +				/*
>> +				 * For now only support anonymous memory migrating to
>> +				 * device private or coherent memory.
>> +				 *
>> +				 * Try to get rid of swap cache if possible.
>> +				 *
>> +				 */
>> +				if (!folio_test_anon(folio) || !folio_free_swap(folio)) {
> 
> Please avoid the overly long lines.
> 

Thanks,
Mika



  reply	other threads:[~2023-06-07 15:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20230606050149.25699-1-mpenttil@redhat.com>
2023-06-07 14:10 ` [PATCH v3] mm/migrate_device: Try to handle swapcache pages Christoph Hellwig
2023-06-07 15:56   ` Mika Penttilä [this message]
2023-06-07 16:06   ` Mika Penttilä
2023-06-12  4:53     ` 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=43460b82-06c0-dfca-1cfd-d99208e2c647@redhat.com \
    --to=mpenttil@redhat.com \
    --cc=apopple@nvidia.com \
    --cc=hch@infradead.org \
    --cc=jhubbard@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=rcampbell@nvidia.com \
    --cc=ying.huang@intel.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).