Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp5379738pxv; Wed, 21 Jul 2021 04:12:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzI4Yo+1gYl7t/Ajlx5T2a2LPM6yxNG3MOqx22qrDMVUaqIIpxoyIhxf1eAq3DzorQEDX1m X-Received: by 2002:a02:a69a:: with SMTP id j26mr30379204jam.9.1626865934970; Wed, 21 Jul 2021 04:12:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626865934; cv=none; d=google.com; s=arc-20160816; b=E06Jt+6PAR0sm/0OZuRE4aO4H6H3RHeDggGi1I1ZxpzdtgywsOeoqIeRWpufsBEcsx EBEnrbodUuQAGhV47rbCvHnHuoPP5lrzEb5WKkrs2Uj55GOdsaYGQJgjZd5zrdoO0K3M D9m5Ky1TD8hJLSRlwYCAbyKJgrsXbs6WEYIAXTagB1evQMkP0Ylyhq/w79XUNYVesDef 7Swug4qgLd4KJ28QefUdO8FHNWEOurZa4TExgyD2e86n4uO0bwz7bt+I7F+yJDPvzWzo YiCnJ6GdFq3d8GUqdutTe5CsVIDQnyRUHEnHOsXjsjNYpnCHUreQd9Ehd/tDEqEhg9jm xfyg== 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:references:cc :to:from:subject; bh=zQN0lsOXcywcU0ve7hvtmUNXMD8X3nGhcfMCV/62an4=; b=mgMjI/yHp4/L8Pq1ZdnD6O2Upfpqo+sHgR/YwU5rblNay+FD7MpIu9igDuKmVhMSeP +V3psAsunmvVXo0F+q/dXJxZEqHTxk4wmXygdmsF5wGZxvaP080uXySUYpNC+MhslyYQ D+CIQPamasNeUuQcMAfQaK+pS0B5BRLuFqpFhwqlJ0o197OGK2ay14RLhoCATgix4U0+ CGo1I6GoqCQnaogt5pmNTuoVDHcrCIH8XU0vuMqJUAKlJNT1Rb5BYt5ruq4LKCVRjV9u 9i93cr9+9oB3bLUzbEZNoLlFKVIvmeYfEYyrDgTdOzEPuXOv3OnHgLbBxVtn9OLu1KhB 6SXw== 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 k25si15968254jan.106.2021.07.21.04.12.03; Wed, 21 Jul 2021 04:12:14 -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 S237712AbhGUK1k (ORCPT + 99 others); Wed, 21 Jul 2021 06:27:40 -0400 Received: from foss.arm.com ([217.140.110.172]:51724 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238935AbhGUKSs (ORCPT ); Wed, 21 Jul 2021 06:18:48 -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 DAA7631B; Wed, 21 Jul 2021 03:58:46 -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 3935E3F99C; Wed, 21 Jul 2021 03:58:42 -0700 (PDT) Subject: Re: [PATCH v3 01/12] mm/debug_vm_pgtable: Introduce struct pgtable_debug_args From: Anshuman Khandual 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> Message-ID: <23bb5363-fd36-5161-0ba2-da1efc3e3018@arm.com> Date: Wed, 21 Jul 2021 16:29:33 +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: 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 4:09 PM, Anshuman Khandual wrote: > > 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 This one instead. Gerald Schaefer