From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2010AC433EF for ; Thu, 3 Mar 2022 21:46:12 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A139E8D0002; Thu, 3 Mar 2022 16:46:11 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 9C2718D0001; Thu, 3 Mar 2022 16:46:11 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 88BC68D0002; Thu, 3 Mar 2022 16:46:11 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0234.hostedemail.com [216.40.44.234]) by kanga.kvack.org (Postfix) with ESMTP id 78A1D8D0001 for ; Thu, 3 Mar 2022 16:46:11 -0500 (EST) Received: from smtpin29.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 3809C18209A83 for ; Thu, 3 Mar 2022 21:46:11 +0000 (UTC) X-FDA: 79204408542.29.D16C185 Received: from mail-il1-f169.google.com (mail-il1-f169.google.com [209.85.166.169]) by imf19.hostedemail.com (Postfix) with ESMTP id AFDE11A0005 for ; Thu, 3 Mar 2022 21:46:10 +0000 (UTC) Received: by mail-il1-f169.google.com with SMTP id q4so5153684ilt.0 for ; Thu, 03 Mar 2022 13:46:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=dK/IOow+P5v9xYBFUtB5XaIy2vFaJ6VtzofO9XJ2vLA=; b=iaUIzEybhNynRX57A9NPhLVQR8qWsrW87j7I2gP6PfPhB1N2KJLDGvER3L91GYIYfn kx4r6NK8bwnmnvZrmxOmn5r5YGx78vycqExakQs/gIf+aQtfsFWLFv7Mbo/h4kK+Fby1 +ku6NcFXonpuW2pUXBf80x6Inw567tXGOV9Aw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=dK/IOow+P5v9xYBFUtB5XaIy2vFaJ6VtzofO9XJ2vLA=; b=5GEy63iUK2K1w0OBRi9aJ5YKzo807e2w0rSSl1RHBoXApv5Kp1xQ98FRhWFphdeZ5S RZh/b2/bEzPFK6w7jmBFi1XkYRb4YQ7EV3sEf1Iosdm/jAWABQBf4Uijs+0/isaEsC/0 qulg6LwqMhuMQK4mN3fXRRzpESOjbAlDn8Y5eTPXZdGCDheJH0uqRo7mYrJ+JmhzUawM cFQefyI70g/y7xLntVRVFgHgtKk0a3rU3cBophyLU9EcTf0VbUN2NJuu+EaW8iQ4xqNf n/7SJBcmlvXi6aetYpDa7SGHzzBzYHi4sRd9y9vZ/Fn3iO3u7YUQhXoTbR/zvoYScTJt f7RQ== X-Gm-Message-State: AOAM533F8myvKEO+le5LnkfOQr31/lQ2hCuJZLR0jCgfJK1FK9sQdWEQ V7MeBu5KOut3POekc3BYYwNVcg== X-Google-Smtp-Source: ABdhPJxFTfoJrFkecC1ukZMVcqeTeGXHhkLuHmnCG5OGT8GcD+G3FBEHb10TRMnae/SeoXVaG9ANcA== X-Received: by 2002:a92:c888:0:b0:2c2:fb23:1cf with SMTP id w8-20020a92c888000000b002c2fb2301cfmr16145861ilo.301.1646343969977; Thu, 03 Mar 2022 13:46:09 -0800 (PST) Received: from [192.168.1.128] ([71.205.29.0]) by smtp.gmail.com with ESMTPSA id b10-20020a056602000a00b0064074921986sm2779927ioa.41.2022.03.03.13.46.09 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 03 Mar 2022 13:46:09 -0800 (PST) Subject: Re: [PATCH V3] selftests: vm: Add test for Soft-Dirty PTE bit To: Gabriel Krisman Bertazi Cc: David Hildenbrand , Muhammad Usama Anjum , Andrew Morton , Shuah Khan , kernel@collabora.com, kernelci@groups.io, Will Deacon , linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-kselftest@vger.kernel.org, Shuah Khan References: <20220224212335.3045905-1-usama.anjum@collabora.com> <3b7c068b-ac7e-62fc-f0cd-a8dbf8642876@redhat.com> <6133317f-4da0-3aae-f352-b75f0f94dbd4@linuxfoundation.org> <87o82mkhif.fsf@collabora.com> From: Shuah Khan Message-ID: Date: Thu, 3 Mar 2022 14:46:08 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <87o82mkhif.fsf@collabora.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: AFDE11A0005 X-Rspam-User: Authentication-Results: imf19.hostedemail.com; dkim=pass header.d=linuxfoundation.org header.s=google header.b=iaUIzEyb; spf=pass (imf19.hostedemail.com: domain of skhan@linuxfoundation.org designates 209.85.166.169 as permitted sender) smtp.mailfrom=skhan@linuxfoundation.org; dmarc=pass (policy=none) header.from=linuxfoundation.org X-Stat-Signature: mcctg7a86izo1ptmd6tmbbeod7u8dedm X-HE-Tag: 1646343970-428799 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000023, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 3/3/22 11:39 AM, Gabriel Krisman Bertazi wrote: > Shuah Khan writes: > >> On 2/28/22 2:37 AM, David Hildenbrand wrote: >>> On 24.02.22 22:23, Muhammad Usama Anjum wrote: >>>> This introduces three tests: >>>> 1) Sanity check soft dirty basic semantics: allocate area, clean, dirty, >>>> check if the SD bit flipped. >>>> 2) Check VMA reuse: validate the VM_SOFTDIRTY usage >>>> 3) Check soft-dirty on huge pages >>>> >>>> This was motivated by Will Deacon's fix commit 912efa17e512 ("mm: proc: >>>> Invalidate TLB after clearing soft-dirty page state"). I was tracking the >>>> same issue that he fixed, and this test would have caught it. >>>> >>> A note that madv_populate.c already contains some SOFTDIRTY tests >>> regarding MADV_POPULATE. Eventually we want to factor out >>> softdirty/pagemap handling+checks for easier reuse. >>> >> >> Is this patch unnecessary then? > > It is not unnecessary since the madv test doesn't cover the bug tested > here, afaik. But, as mentioned when I originally submitted this patch, > it should be merged into selftests/vm/madv_populate.c or, at least, > reuse that existing infrastructure. > > https://lore.kernel.org/lkml/87lf553z5g.fsf@collabora.com/ > Oops this one came in a few months ago and appears to have slipped through and didn't get the right attention. Sorry about that. Please resend the patch and cc all the everybody on this thread. I would like to have your patch reviewed and looked at first. This patch needs rework sine it has several comments to be addressed. thanks, -- Shuah