Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp5416577pxv; Wed, 21 Jul 2021 05:06:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzRaNih7iAmglbr2TXJy4DS7QKrlMD/sBRfiJwa4c6sjk1yFb2SPPQy4gmmzlAPz0sk6gtF X-Received: by 2002:a05:6402:5212:: with SMTP id s18mr47754270edd.370.1626869167964; Wed, 21 Jul 2021 05:06:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626869167; cv=none; d=google.com; s=arc-20160816; b=xcGFS4ovVJK36jK4ZfrPoPcthjI2gzvJpjJISDV5lRnfr0XLjwZhQjW4jbpYg4NRG8 IXfZLWS4qOG4WGrdY1UJY7+mQdD475uiEOZ/Hl0EsIJQ3Z0kqGA0L4p2lNUn/g5BW8s+ Y0c9T9iiL3kQquY97OyWKp8MJJ4ErNDQswDndNhltVoqVIKZpWx8Xqpp0jzTbBaBjbWw UI580T4fDl8dsFi2k3nDQR0BoVoaWdpwV0CF2Ee6F/Ph0/8kgwyVhxrhg8YlVj+UrOUf pyX9gJPM1Y2QzTltvPa8QPbmvi0H3nhzq7EcktAlWv2JLWoAa6b/TcxrExxV6iZumLns LmlQ== 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:reply-to:dkim-signature; bh=8YXS+13F1KNUgpwdBeKvcGRJTj7T9ba6km6u1OzRRA0=; b=gICnAKZg0N6cepmJMchp6O5+wWQTRCigeni1SvqUgXGAdxina9AqLOdXVjmOkX9Fd6 SylFP2if72QaBEmNXMxRw66D6Mi/5FJMhAaC6rKnSojFvb9XMRe21Pt1XgQIc9cggOS5 SHXRZ4JnEW8MHJp4nN8ZIa2lfSfxtX7b3Qf3IfpJ7ZLyseJYXi2uKVzxCGtHXxab3mf/ CFrJT9izs3kMZ/mWDe7ugqr0VbeGOObBcZQ4YNKUGqOnEAARn6W0FQsULpkHyJMW0V50 eakPxJcmtmxH3Lf6XGjr8bNLUe/D+/tjuoMAMrD3IVSvvo6se8UhsQ2NvObQRjy6zCdY lmig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=BAhKX6Fo; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s14si27880152ejf.668.2021.07.21.05.05.44; Wed, 21 Jul 2021 05:06:07 -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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=BAhKX6Fo; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237005AbhGULXX (ORCPT + 99 others); Wed, 21 Jul 2021 07:23:23 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:21275 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234059AbhGULTU (ORCPT ); Wed, 21 Jul 2021 07:19:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626868769; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8YXS+13F1KNUgpwdBeKvcGRJTj7T9ba6km6u1OzRRA0=; b=BAhKX6FooCA+MKxQP1qLtB4uC82aJ8MGNOARVj+cQb88BBO9Bnk3iDFyFdKbm2gZY+svE+ HyXQRO4+KN+JduOzsitMN83PoBXtyRsVR+5aFDiIYNnSN3HgUtbyxxqc4ntuThrLXsHD/X Qek1ofC26RcAjShAtfeWi8emy7jjm3I= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-11-MYgXijhtNWSsHeKOifwtdA-1; Wed, 21 Jul 2021 07:59:28 -0400 X-MC-Unique: MYgXijhtNWSsHeKOifwtdA-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5172C1074671; Wed, 21 Jul 2021 11:59:26 +0000 (UTC) Received: from [10.64.54.195] (vpn2-54-195.bne.redhat.com [10.64.54.195]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A9C755D9FC; Wed, 21 Jul 2021 11:59:21 +0000 (UTC) Reply-To: Gavin Shan Subject: Re: [PATCH v3 01/12] mm/debug_vm_pgtable: Introduce struct pgtable_debug_args To: Anshuman Khandual , 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> <23bb5363-fd36-5161-0ba2-da1efc3e3018@arm.com> From: Gavin Shan Message-ID: <8f2cac0a-caac-9a0b-3eff-83f120882e48@redhat.com> Date: Wed, 21 Jul 2021 21:59:38 +1000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.0 MIME-Version: 1.0 In-Reply-To: <23bb5363-fd36-5161-0ba2-da1efc3e3018@arm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/21/21 8:59 PM, Anshuman Khandual wrote: > On 7/21/21 4:09 PM, Anshuman Khandual wrote: >> On 7/21/21 3:50 PM, Gavin Shan wrote: >>> 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 > Sure, It's always nice to have more reviews from the experts. I will include them when I post v4. Thanks again for your time to review :) Thanks, Gavin