Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp48831ybx; Tue, 5 Nov 2019 19:14:03 -0800 (PST) X-Google-Smtp-Source: APXvYqwdIZh/SEyKhWbQb8+YsXbmUZ1wi685JboGjdG+lvmOf+a6iEgtX0V28mpJcwQFB6Knf8qo X-Received: by 2002:a17:906:49d1:: with SMTP id w17mr33292465ejv.101.1573010043296; Tue, 05 Nov 2019 19:14:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573010043; cv=none; d=google.com; s=arc-20160816; b=HDkwzvm2DpoUs9LNNocpuChJL829nW+FURw+tOy6w+dOKt35oBnaFK1W7ADRLATC/C xjIkzyHR4t1RDTwVmcZD+2ao107E6tRpms2H4cw7ldn4AcbFM0/K4vGQNbHH4YEVF21v CtQB03hsPGATu3FXeMkzypLN1u4GT5h2LYA8+8Bkf/uGLWSFwSpntBWtieTIi8/Eh3n2 89cI/zR8R4cjLbeIsP6ZFxQ0aSPCB0RCP55xc+V4XXXzzplOQsN61pZnCfi/YYtehUiO /LnV6tkvcFXM5S6Xp5XMnjcVGDzmsZLvQHsMlfVKLoBBOOE4Bbl0ryrIJOWMsGDTWzp9 I28A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=HUXTPWQDUjFwRvxyYNoY0aK4UYTXg0/sziclg1EA3Qw=; b=T3vM8dFJTwMz38Nm2s9c0kdngu6ygkRlxe1XLOi9bO0m2Vt7gKVXnteeOc89H5gKbJ jdEh7bbDKLuSExOjANnN8yspVviDfMhzdnAjly3Fmu/A52MHkO6ra/wAc22xXmJJxvG7 eGJHKrhJTG3lAS6Jx+nltoLoy6rSMxSaOnjJuHUIpomdkMFXOvLYY+CckVKKhNtoh14m ok/XDM8JvMoxzGVIr4Lb/VjZe75TEsSoifaUa8167ZOGTyrzjVPVKAwCUR7SJy4zQReh zEYa0/kdi8SV607a6nAR/TuCr2k6rbWeInymM7hTLZjCVkNsgoDwVcflDTW7hv5gkTph KBsQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m19si12081397eje.312.2019.11.05.19.13.40; Tue, 05 Nov 2019 19:14:03 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731227AbfKFDKo (ORCPT + 99 others); Tue, 5 Nov 2019 22:10:44 -0500 Received: from foss.arm.com ([217.140.110.172]:32962 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730562AbfKFDKo (ORCPT ); Tue, 5 Nov 2019 22:10:44 -0500 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 0480C30E; Tue, 5 Nov 2019 19:10:43 -0800 (PST) Received: from [192.168.225.149] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 4DA843F719; Tue, 5 Nov 2019 19:10:22 -0800 (PST) Subject: Re: [PATCH V8] mm/debug: Add tests validating architecture page table helpers To: Gerald Schaefer Cc: linux-mm@kvack.org, Andrew Morton , Vlastimil Babka , Greg Kroah-Hartman , Thomas Gleixner , Mike Rapoport , Jason Gunthorpe , Dan Williams , Peter Zijlstra , Michal Hocko , Mark Rutland , Mark Brown , Steven Price , Ard Biesheuvel , Masahiro Yamada , Kees Cook , Tetsuo Handa , Matthew Wilcox , Sri Krishna chowdary , Dave Hansen , Russell King - ARM Linux , Michael Ellerman , Paul Mackerras , Martin Schwidefsky , Heiko Carstens , "David S. Miller" , Vineet Gupta , James Hogan , Paul Burton , Ralf Baechle , "Kirill A . Shutemov" , Christophe Leroy , Ingo Molnar , linux-snps-arc@lists.infradead.org, linux-mips@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-ia64@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, x86@kernel.org, linux-kernel@vger.kernel.org References: <1572240562-23630-1-git-send-email-anshuman.khandual@arm.com> <20191105203638.6889a994@thinkpad> From: Anshuman Khandual Message-ID: Date: Wed, 6 Nov 2019 08:40:57 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20191105203638.6889a994@thinkpad> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/06/2019 01:06 AM, Gerald Schaefer wrote: > On Mon, 28 Oct 2019 10:59:22 +0530 > Anshuman Khandual wrote: > >> This adds tests which will validate architecture page table helpers and >> other accessors in their compliance with expected generic MM semantics. >> This will help various architectures in validating changes to existing >> page table helpers or addition of new ones. >> >> This test covers basic page table entry transformations including but not >> limited to old, young, dirty, clean, write, write protect etc at various >> level along with populating intermediate entries with next page table page >> and validating them. >> >> Test page table pages are allocated from system memory with required size >> and alignments. The mapped pfns at page table levels are derived from a >> real pfn representing a valid kernel text symbol. This test gets called >> right after page_alloc_init_late(). >> >> This gets build and run when CONFIG_DEBUG_VM_PGTABLE is selected along with >> CONFIG_VM_DEBUG. Architectures willing to subscribe this test also need to >> select CONFIG_ARCH_HAS_DEBUG_VM_PGTABLE which for now is limited to x86 and >> arm64. Going forward, other architectures too can enable this after fixing >> build or runtime problems (if any) with their page table helpers. > > I've prepared a couple of commits to our arch code to make this work on s390, > they will go upstream in the next merge window. After that, we can add s390 > to the supported architectures. Thats good. > > We had some issues, e.g. because we do not report large entries as bad in > pxd_bad(), do not check for folded page tables in pxd_free(), or assume > that primitives like pmd_mkdirty() will only be called after pmd_mkhuge(). > None of those should have any impact on current code, but your test module > revealed that we do not behave like other architectures in some aspects, > and it's good to find and fix such things to prevent possible future issues. Right and those s390 fixes are the testimony for the usefulness of this test. > > Thanks a lot for the effort! > > Regards, > Gerald > >