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: <d8640bd6-1a72-4969-86de-e63736af53d8@redhat.com>
Date: Mon, 1 Sep 2025 15:43:44 +0200
From: David Hildenbrand <david@...hat.com>
To: Kiryl Shutsemau <kas@...nel.org>
Cc: Dev Jain <dev.jain@....com>, akpm@...ux-foundation.org,
 willy@...radead.org, hughd@...gle.com, ziy@...dia.com,
 baolin.wang@...ux.alibaba.com, lorenzo.stoakes@...cle.com,
 Liam.Howlett@...cle.com, npache@...hat.com, ryan.roberts@....com,
 baohua@...nel.org, linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH] mm: Enable khugepaged to operate on non-writable VMAs

On 01.09.25 15:15, Kiryl Shutsemau wrote:
> On Mon, Sep 01, 2025 at 10:32:34AM +0200, David Hildenbrand wrote:
>>
>>>> @@ -676,9 +676,7 @@ static int __collapse_huge_page_isolate(struct vm_area_struct *vma,
>>>>    			writable = true;
>>>>    	}
>>>> -	if (unlikely(!writable)) {
>>>> -		result = SCAN_PAGE_RO;
>>>> -	} else if (unlikely(cc->is_khugepaged && !referenced)) {
>>>> +	if (unlikely(cc->is_khugepaged && !referenced)) {
>>>>    		result = SCAN_LACK_REFERENCED_PAGE;
>>>>    	} else {
>>>>    		result = SCAN_SUCCEED;
>>>> @@ -1421,9 +1419,7 @@ static int hpage_collapse_scan_pmd(struct mm_struct *mm,
>>>>    		     mmu_notifier_test_young(vma->vm_mm, _address)))
>>>>    			referenced++;
>>>>    	}
>>>> -	if (!writable) {
>>>> -		result = SCAN_PAGE_RO;
>>>> -	} else if (cc->is_khugepaged &&
>>>> +	if (cc->is_khugepaged &&
>>>
>>> The only practical use of the writable is gone. The only other usage is
>>> tracing which can be dropped to as it is not actionable anymore.
>>>
>>> Could you drop writable? Maybe as a separate commit.
>>
>> I think we should just do it in the same patch.
> 
> Change in trace_mm_collapse_huge_page_isolate() interface doesn't belong
> to the same patch in my view.

We frequently adjust tracing code (which is specific to khugepaged in 
this case) in the same patch.

Anyhow, no strong opinion.

-- 
Cheers

David / dhildenb


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ