[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2a9c760e-c5cb-4ca5-8651-cc870a63ddbd@redhat.com>
Date: Wed, 5 Jun 2024 09:53:21 +0200
From: David Hildenbrand <david@...hat.com>
To: Alex Shi <seakeel@...il.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 09/10] mm/ksm: calc_checksum for folio
On 05.06.24 05:44, Alex Shi wrote:
>
>
> On 6/4/24 9:18 PM, David Hildenbrand wrote:
>>> @@ -2369,7 +2371,7 @@ static void cmp_and_merge_page(struct page *page, struct ksm_rmap_item *rmap_ite
>>> * don't want to insert it in the unstable tree, and we don't want
>>> * to waste our time searching for something identical to it there.
>>> */
>>> - checksum = calc_checksum(page);
>>> + checksum = calc_checksum(folio);
>>
>> So for a large folio you suddenly checksum more than a single page? That's wrong.
>>
>> Or am I missing something?
>
> I am not sure if this change are good too, anyway, comparing the whole folio may have it advantages on efficiency, but more splitting do save more pages.
Calculating the checksum of something that could be a large folio when
you might want to deduplicate subpages of the folio (and decide if you
might want to split it) sound very wrong.
Please pay more attention to the details how the current code works and
how it all works with tail pages.
--
Cheers,
David / dhildenb
Powered by blists - more mailing lists