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]
Date:   Wed, 30 Mar 2022 10:04:54 +0800
From:   Miaohe Lin <linmiaohe@...wei.com>
To:     Matthew Wilcox <willy@...radead.org>
CC:     <akpm@...ux-foundation.org>, <linux-mm@...ck.org>,
        <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 3/8] mm/vmscan: introduce helper function
 reclaim_page_list()

On 2022/3/29 21:50, Matthew Wilcox wrote:
> On Tue, Mar 29, 2022 at 09:26:14PM +0800, Miaohe Lin wrote:
>> -unsigned long reclaim_pages(struct list_head *page_list)
>> +static inline unsigned int reclaim_page_list(struct list_head *page_list, struct pglist_data *pgdat)
>>  {
>> -	int nid = NUMA_NO_NODE;
>> -	unsigned int nr_reclaimed = 0;
>> -	LIST_HEAD(node_page_list);
>>  	struct reclaim_stat dummy_stat;
>> +	unsigned int nr_reclaimed;
>>  	struct page *page;
>> -	unsigned int noreclaim_flag;
>>  	struct scan_control sc = {
>>  		.gfp_mask = GFP_KERNEL,
>>  		.may_writepage = 1,
>> @@ -2529,6 +2526,24 @@ unsigned long reclaim_pages(struct list_head *page_list)
>>  		.no_demotion = 1,
>>  	};
>>  
>> +	nr_reclaimed = shrink_page_list(page_list, pgdat, &sc, &dummy_stat, false);
>> +	while (!list_empty(page_list)) {
>> +		page = lru_to_page(page_list);
>> +		list_del(&page->lru);
>> +		putback_lru_page(page);
> 
> Why wouldn't you use a folio here?
> 

I was just wanting to keep the code consistent with the previous one. Am I supposed to
use a folio here ? If so, will do it in V2.

Thanks.

> 
> .
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ