lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <43460b82-06c0-dfca-1cfd-d99208e2c647@redhat.com>
Date:   Wed, 7 Jun 2023 18:56:18 +0300
From:   Mika Penttilä <mpenttil@...hat.com>
To:     Christoph Hellwig <hch@...radead.org>
Cc:     linux-kernel@...r.kernel.org, linux-mm@...ck.org,
        Alistair Popple <apopple@...dia.com>,
        John Hubbard <jhubbard@...dia.com>,
        Ralph Campbell <rcampbell@...dia.com>,
        "Huang, Ying" <ying.huang@...el.com>
Subject: Re: [PATCH v3] mm/migrate_device: Try to handle swapcache pages

Hi,


On 7.6.2023 17.10, Christoph Hellwig wrote:
> On Tue, Jun 06, 2023 at 08:01:49AM +0300, mpenttil@...hat.com wrote:
>> From: Mika Penttilä <mpenttil@...hat.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ