[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4d299245-3166-4810-b22b-2a5b4f54a049@gmail.com>
Date: Tue, 4 Jun 2024 18:26:11 +0800
From: Alex Shi <seakeel@...il.com>
To: David Hildenbrand <david@...hat.com>, alexs@...nel.org,
Andrew Morton <akpm@...ux-foundation.org>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, izik.eidus@...ellosystems.com,
willy@...radead.org, aarcange@...hat.com, chrisw@...s-sol.org,
hughd@...gle.com
Subject: Re: [PATCH 01/10] mm/ksm: reduce the flush action for ksm merging
page
On 6/4/24 4:07 PM, David Hildenbrand wrote:
> On 04.06.24 06:24, alexs@...nel.org wrote:
>> From: "Alex Shi (tencent)" <alexs@...nel.org>
>>
>> We can put off the flush action util a merging is realy coming. That
>> could reduce some unmerge page flushing.
>> BTW, flushing only do at arm, mips and few other archs.
>>
>
> I'm no expert on that flushing, but I thought we would have to do the flushing before accessing page content -- before calculating the checksum etc.
>
> Now you would only do it before the pages_identical() check, but not when calculating the checksum.
>
Hi David,
Thanks a lot for comments!
If calc_checksum() is wrong before pages_idential(), (that's just after page was write_protected, that's a real guarantee for page context secured) pages_identical could recheck and make thing right.
And as to 2 flush functions here, I didn't see the guarantee for other writer from any other place. So maybe we should remove these flush action?
Thanks
Alex
Powered by blists - more mailing lists