From: Anshuman Khandual <anshuman.khandual@arm•com>
To: Matthew Wilcox <willy@infradead•org>
Cc: Mark Rutland <mark.rutland@arm•com>,
linux-ia64@vger•kernel.org, linux-sh@vger•kernel.org,
Peter Zijlstra <peterz@infradead•org>,
James Hogan <jhogan@kernel•org>,
Tetsuo Handa <penguin-kernel@i-love•sakura.ne.jp>,
Heiko Carstens <heiko.carstens@de•ibm.com>,
Michal Hocko <mhocko@kernel•org>,
linux-mm@kvack•org, Dave Hansen <dave.hansen@intel•com>,
Paul Mackerras <paulus@samba•org>,
sparclinux@vger•kernel.org, Thomas Gleixner <tglx@linutronix•de>,
linux-s390@vger•kernel.org, Michael Ellerman <mpe@ellerman•id.au>,
x86@kernel•org, Russell King - ARM Linux <linux@armlinux•org.uk>,
Steven Price <Steven.Price@arm•com>,
Jason Gunthorpe <jgg@ziepe•ca>,
linux-arm-kernel@lists•infradead.org,
linux-snps-arc@lists•infradead.org,
Kees Cook <keescook@chromium•org>,
Masahiro Yamada <yamada.masahiro@socionext•com>,
Mark Brown <broonie@kernel•org>,
Dan Williams <dan.j.williams@intel•com>,
Vlastimil Babka <vbabka@suse•cz>,
Sri Krishna chowdary <schowdary@nvidia•com>,
Ard Biesheuvel <ard.biesheuvel@linaro•org>,
Greg Kroah-Hartman <gregkh@linuxfoundation•org>,
linux-mips@vger•kernel.org, Ralf Baechle <ralf@linux-mips•org>,
linux-kernel@vger•kernel.org, Paul Burton <paul.burton@mips•com>,
Mike Rapoport <rppt@linux•vnet.ibm.com>,
Vineet Gupta <vgupta@synopsys•com>,
Martin Schwidefsky <schwidefsky@de•ibm.com>,
Andrew Morton <akpm@linux-foundation•org>,
linuxppc-dev@lists•ozlabs.org,
"David S. Miller" <davem@davemloft•net>
Subject: Re: [RFC V2 0/1] mm/debug: Add tests for architecture exported page table helpers
Date: Mon, 26 Aug 2019 08:07:13 +0530 [thread overview]
Message-ID: <7a88f6bb-e8c7-3ac7-2f92-1de752a01f33@arm.com> (raw)
In-Reply-To: <20190809135202.GN5482@bombadil.infradead.org>
On 08/09/2019 07:22 PM, Matthew Wilcox wrote:
> On Fri, Aug 09, 2019 at 04:05:07PM +0530, Anshuman Khandual wrote:
>> On 08/09/2019 03:46 PM, Matthew Wilcox wrote:
>>> On Fri, Aug 09, 2019 at 01:03:17PM +0530, Anshuman Khandual wrote:
>>>> Should alloc_gigantic_page() be made available as an interface for general
>>>> use in the kernel. The test module here uses very similar implementation from
>>>> HugeTLB to allocate a PUD aligned memory block. Similar for mm_alloc() which
>>>> needs to be exported through a header.
>>>
>>> Why are you allocating memory at all instead of just using some
>>> known-to-exist PFNs like I suggested?
>>
>> We needed PFN to be PUD aligned for pfn_pud() and PMD aligned for mk_pmd().
>> Now walking the kernel page table for a known symbol like kernel_init()
>
> I didn't say to walk the kernel page table. I said to call virt_to_pfn()
> for a known symbol like kernel_init().
>
>> as you had suggested earlier we might encounter page table page entries at PMD
>> and PUD which might not be PMD or PUD aligned respectively. It seemed to me
>> that alignment requirement is applicable only for mk_pmd() and pfn_pud()
>> which create large mappings at those levels but that requirement does not
>> exist for page table pages pointing to next level. Is not that correct ? Or
>> I am missing something here ?
>
> Just clear the bottom bits off the PFN until you get a PMD or PUD aligned
> PFN. It's really not hard.
As Mark pointed out earlier that might end up being just a synthetic PFN
which might not even exist on a given system.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists•infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2019-08-26 2:37 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-09 7:33 [RFC V2 0/1] mm/debug: Add tests for architecture exported page table helpers Anshuman Khandual
2019-08-09 7:33 ` [RFC V2 1/1] mm/pgtable/debug: Add test validating architecture " Anshuman Khandual
2019-08-09 10:16 ` [RFC V2 0/1] mm/debug: Add tests for architecture exported " Matthew Wilcox
2019-08-09 10:35 ` Anshuman Khandual
2019-08-09 13:52 ` Matthew Wilcox
2019-08-26 2:37 ` Anshuman Khandual [this message]
2019-08-26 13:13 ` Matthew Wilcox
2019-08-28 9:22 ` Anshuman Khandual
2019-08-09 11:44 ` Mark Rutland
2019-08-26 2:29 ` Anshuman Khandual
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7a88f6bb-e8c7-3ac7-2f92-1de752a01f33@arm.com \
--to=anshuman.khandual@arm$(echo .)com \
--cc=Steven.Price@arm$(echo .)com \
--cc=akpm@linux-foundation$(echo .)org \
--cc=ard.biesheuvel@linaro$(echo .)org \
--cc=broonie@kernel$(echo .)org \
--cc=dan.j.williams@intel$(echo .)com \
--cc=dave.hansen@intel$(echo .)com \
--cc=davem@davemloft$(echo .)net \
--cc=gregkh@linuxfoundation$(echo .)org \
--cc=heiko.carstens@de$(echo .)ibm.com \
--cc=jgg@ziepe$(echo .)ca \
--cc=jhogan@kernel$(echo .)org \
--cc=keescook@chromium$(echo .)org \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
--cc=linux-ia64@vger$(echo .)kernel.org \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-mips@vger$(echo .)kernel.org \
--cc=linux-mm@kvack$(echo .)org \
--cc=linux-s390@vger$(echo .)kernel.org \
--cc=linux-sh@vger$(echo .)kernel.org \
--cc=linux-snps-arc@lists$(echo .)infradead.org \
--cc=linux@armlinux$(echo .)org.uk \
--cc=linuxppc-dev@lists$(echo .)ozlabs.org \
--cc=mark.rutland@arm$(echo .)com \
--cc=mhocko@kernel$(echo .)org \
--cc=mpe@ellerman$(echo .)id.au \
--cc=paul.burton@mips$(echo .)com \
--cc=paulus@samba$(echo .)org \
--cc=penguin-kernel@i-love$(echo .)sakura.ne.jp \
--cc=peterz@infradead$(echo .)org \
--cc=ralf@linux-mips$(echo .)org \
--cc=rppt@linux$(echo .)vnet.ibm.com \
--cc=schowdary@nvidia$(echo .)com \
--cc=schwidefsky@de$(echo .)ibm.com \
--cc=sparclinux@vger$(echo .)kernel.org \
--cc=tglx@linutronix$(echo .)de \
--cc=vbabka@suse$(echo .)cz \
--cc=vgupta@synopsys$(echo .)com \
--cc=willy@infradead$(echo .)org \
--cc=x86@kernel$(echo .)org \
--cc=yamada.masahiro@socionext$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox