Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp2265983pxm; Fri, 4 Mar 2022 12:41:04 -0800 (PST) X-Google-Smtp-Source: ABdhPJybe4p0HP0B08ypQkGJ8ZuqOKXA31Xm6VHIS72UrIi8oY/KCjhY9WBMDtcaAxaDjuyardlk X-Received: by 2002:aa7:88c9:0:b0:4f3:645a:4a11 with SMTP id k9-20020aa788c9000000b004f3645a4a11mr487641pff.17.1646426463947; Fri, 04 Mar 2022 12:41:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646426463; cv=none; d=google.com; s=arc-20160816; b=DjnGemgcjjfUCMiT+eg1LBBYwtmUOSt735HyeNzKOy2XKxwonZlFARxg+RHMye1shT /3nQjCvbmBOoOMyNSqQIyA3yIrmWZZA4SiCPz2Z+JsgyyJQYcdiuLSN475eM1ybaRkDq PvLaGnQLLMUqhJSu54Ls3juiqkycKd1l8EIunUfBRzsUxQyc70JNU+MaussAlHUwbIgf z5iT9/fepH9Sk8nqFulBB1G3CvUxB2NUZSdOxAuPQyvGOq/IxUxyoDEdej+Zf5oDMrIN /uEqAVxzC5Yo+bjEeAlts8IjWDDLy7T/FA8XTjhkHfHAwoeTspmxb+3W1T8YlzkNWYpd pkEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:message-id:in-reply-to :date:references:organization:subject:cc:to:from:dkim-signature; bh=3SMFFBSR/Ahb6cSQ13+JP3FInwaerx+2L4nn6NVJo9s=; b=g6aot7Ls7iNXMnU1/74NzwsJfclUyF+Cs3zMl++OkqqcecemLhTx1FEpd9CZl+ZTbF pewSqA+a38Zo+urL0NqizKpH3+Hmnm+rBEADoOkFkH9g7gSC141m3fnv54nSe4q8t5+7 POWgQkdDb/2Nkgx2cqRXc2+fEG4yu98aDIQNE3Z6a8TvHJ+YBNXjcsGm/mGPIB913Nwc Lzor6wQOM5Ol9oriSuexYALhbQiT/xS8GGY+583WaAdCzs532dfcXesWazl3ay838Ehv jf7YA7EW68ew6s08r/6ZGGD1vfN31rOSRLfK0LiC9/eusm2q6KCaK/D0PgTxn8xtmStB JRnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=J9MMbjEO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id w15-20020a63d74f000000b00372f3e76f87si5266984pgi.547.2022.03.04.12.41.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Mar 2022 12:41:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=J9MMbjEO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 363D42CBC8F; Fri, 4 Mar 2022 11:41:02 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239248AbiCDQPT (ORCPT + 99 others); Fri, 4 Mar 2022 11:15:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50742 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240702AbiCDQPK (ORCPT ); Fri, 4 Mar 2022 11:15:10 -0500 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D33B4158790; Fri, 4 Mar 2022 08:14:13 -0800 (PST) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: krisman) with ESMTPSA id F19981F46AE7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1646410452; bh=E2LGBSxjIQabf0bhUjv3Mh0qf9oY5wW2xSYGdoaQSxE=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=J9MMbjEO8Vy4G1dcC7G1yQdRQ9ENG/jVUp0O6noQk/Ma9SU0TLw8UG8CkNW2jzY5b veOgEMQBVj9OJM1zt6lBrNmxVrWnsBgnUSoWp8GUf5DT7cQYXjUQRj0pGetcZX+kEw 21ju2TRlhS+XJIr3CEVqM4YYBBNA68UdKjiI97IhBvVbBOqzpvtqCsDgZB83MFvyuY 1RJyljs9KALlkEydSHqQo0YtWxP1+RAK+EZZIEiiULoAbrgWRWdFWMHvHe3DBrYx5c eIsqA8VwNkmev52sWjJzCbJdrjnJqHeXHxms2Vxfb+I/NvDZw7ZQ49br7OGtWBx4ic Dxl2RU/jOHsCg== From: Gabriel Krisman Bertazi To: Shuah Khan 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 Subject: Re: [PATCH V3] selftests: vm: Add test for Soft-Dirty PTE bit Organization: Collabora 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> Date: Fri, 04 Mar 2022 11:14:08 -0500 In-Reply-To: (Shuah Khan's message of "Thu, 3 Mar 2022 14:46:08 -0700") Message-ID: <87r17hg0fj.fsf@collabora.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE, UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Shuah Khan writes: > 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. Hi Shuah, The patch being discussed in that thread is the same that Usama is proposing here, minus a few modifications. Usama has taken over the work to upstream it. We just spoke, and he will follow up with a new version that addresses the coding issues and reuses the infrastructure from madv_populate.c Sorry for the noise. -- Gabriel Krisman Bertazi