Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp5367313pxv; Wed, 21 Jul 2021 03:53:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJym7dbPlToNwaFNbQmQLHACi8OLxh0V0WuF1qAsiMUBB5hq73GpX9JoQEUw4/zrhdyZXfpn X-Received: by 2002:a17:907:76da:: with SMTP id kf26mr37232500ejc.511.1626864790439; Wed, 21 Jul 2021 03:53:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626864790; cv=none; d=google.com; s=arc-20160816; b=1JBsMWARSbfTMbknCVPRuGNb/1E85DC7YCRgs4MlZmTSEnlfb9Mq/yfj5sOU8FWCJw EPTM1on50k4gtqF8Sw+w84ev1VIWbX/PK9LIxMOf4FG1lJsPoPipTH9uWSvV/FDnVFCB SNyUsQva7Z4W6lr9LpfeWmgoEKM3nPNGWG/MD0eh86chARl8XQvwGLdjC+PUOKSFcs6d Fp0jxDQU2IMM375ozse3obW9suPO/RMXvLerShu3jawtHyvb1itpkPnPoOzYGbfPgXlL UJ4XYa8T4J1yBaosj74y0YpvrOSuhlRKx17Z95minVe3pd4YL4PXYm1hhskWSV0aKz+u NpVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=MrIMqBJ1DB5VoHujh6oaTx/UkS/CrVQsa21gS98m7lI=; b=prU9XbOlVN9KFwv2O94B+E1riTWo1ZPnovIKzpoF0azHQP3D/5tu/do4R/NlCBBhhb 0W4LScvf6ahWVc4vNPcWU5+NIdi6R/ylQDuejLYu9McK39rBFJvC9wT5RmhDGxVGTr4U Gby+32KgiCi+mVB36iOx36Ke7W+hEPwLm3TufMG2p89i01/zJFidT4RRu8L0fa8Q3kp0 dC2EoqbSL+synojIbUe4KLuG7hz68P55KJ2+7FYlRpcSWUhjQ29/580vDRvt7hFOjyVh +SuznClYsNFyWI81n0jTVMAByKaihoIquCYSk7t9aoOBWgfE3So4aUQKjNwWkmDJo1dD k30w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t1si26043709edq.503.2021.07.21.03.52.45; Wed, 21 Jul 2021 03:53:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238511AbhGUKDK (ORCPT + 99 others); Wed, 21 Jul 2021 06:03:10 -0400 Received: from foss.arm.com ([217.140.110.172]:51324 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238744AbhGUJ55 (ORCPT ); Wed, 21 Jul 2021 05:57:57 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 7CEA431B; Wed, 21 Jul 2021 03:38:21 -0700 (PDT) Received: from [10.163.64.235] (unknown [10.163.64.235]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id B82163F694; Wed, 21 Jul 2021 03:38:17 -0700 (PDT) Subject: Re: [PATCH v3 01/12] mm/debug_vm_pgtable: Introduce struct pgtable_debug_args To: Gavin Shan , linux-mm@kvack.org Cc: linux-kernel@vger.kernel.org, catalin.marinas@arm.com, will@kernel.org, akpm@linux-foundation.org, chuhu@redhat.com, shan.gavin@gmail.com, Christophe Leroy , Gerald Schaefer , Qian Cai , "Aneesh Kumar K.V" References: <20210719130613.334901-1-gshan@redhat.com> <20210719130613.334901-2-gshan@redhat.com> <280a5740-b5dc-4b78-3a38-67e5adbb0afd@redhat.com> From: Anshuman Khandual Message-ID: Date: Wed, 21 Jul 2021 16:09:07 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <280a5740-b5dc-4b78-3a38-67e5adbb0afd@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/21/21 3:50 PM, Gavin Shan wrote: > Hi Anshuman, > > On 7/21/21 3:44 PM, Anshuman Khandual wrote: >> On 7/19/21 6:36 PM, Gavin Shan wrote: >>> In debug_vm_pgtable(), there are many local variables introduced to >>> track the needed information and they are passed to the functions for >>> various test cases. It'd better to introduce a struct as place holder >>> for these information. With it, what the functions for various test >>> cases need is the struct, to simplify the code. It also makes code >>> easier to be maintained. >>> >>> Besides, set_xxx_at() could access the data on the corresponding pages >>> in the page table modifying tests. So the accessed pages in the tests >>> should have been allocated from buddy. Otherwise, we're accessing pages >>> that aren't owned by us. This causes issues like page flag corruption. >>> >>> This introduces "struct pgtable_debug_args". The struct is initialized >>> and destroyed, but the information in the struct isn't used yet. They >>> will be used in subsequent patches. >>> >>> Signed-off-by: Gavin Shan >>> --- >>>   mm/debug_vm_pgtable.c | 197 +++++++++++++++++++++++++++++++++++++++++- >>>   1 file changed, 196 insertions(+), 1 deletion(-) >>> > > I saw you've finished the review on PATCH[v3 01/12] and PATCH[v3 02/12]. > I will wait to integrate your comments to v4 until you finish the review > on all patches in v3 series Yes, please do wait for the complete review and test before going for V4. Also please add the following emails on copy next time, so that we might have some more reviews here. Thank you. + Christophe Leroy + Gerald Schaefer + Qian Cai + Aneesh Kumar K.V