[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a1aee16f-cde7-0bed-e1ab-f94b6268e4ff@gmail.com>
Date: Tue, 15 Oct 2019 15:06:41 -0700
From: Vineet Gupta <vineetg76@...il.com>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: linux-arch <linux-arch@...r.kernel.org>,
Arnd Bergmann <arnd@...db.de>,
Peter Zijlstra <peterz@...radead.org>,
"Aneesh Kumar K . V" <aneesh.kumar@...ux.ibm.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Nick Piggin <npiggin@...il.com>, Linux-MM <linux-mm@...ck.org>,
Andrew Morton <akpm@...ux-foundation.org>,
linux-snps-arc@...ts.infradead.org, Will Deacon <will@...nel.org>,
"Kirill A . Shutemov" <kirill.shutemov@...ux.intel.com>
Subject: Re: [PATCH v2 1/5] ARC: mm: remove __ARCH_USE_5LEVEL_HACK
On 10/15/19 2:48 PM, Linus Torvalds wrote:
> On Tue, Oct 15, 2019 at 12:19 PM Vineet Gupta
> <Vineet.Gupta1@...opsys.com> wrote:
>> This is a non-functional change anyways since ARC has software page walker
>> with 2 lookup levels (pgd -> pte)
>
> Could we encourage other architectures to do the same, and get rid of
> all uses of __ARCH_USE_5LEVEL_HACK?
IMHO this should have been done at the onset. The actual changes don't seem that
difficult, just need to add the missing p4d calls although I can sympathize with
hassles of coordinating/building/testing/yadi yada cross arch.
OTOH, the [45]LEVEL_HACK seem like a nice way to "fold" the levels: the
skipped/folded level vanishes completely. Among others it does things like
#define p4d_t pgd_t
On ARC 2-level code:
free_pte_range
pmd_pgtable(*pmd);
((((((*pmd).pud).pgd))) & PAGE_MASK)); <-- 5LEVEL_HACK
vs.
((((((((*pmd).pud).p4d).pgd)))) & PAGE_MASK )); <-- w/o 5LEVEL_HACK
pmd_clear(pmd);
*(pmd)).pud).pgd)))) = 0
vs.
*(pmd)).pud).p4d).pgd)))) = 0
So we may not be able to fix all he historical misgivigs, but this might alleviate
the pain a bit. I'll try to dabble a bit.
Thx for taking a look and te ACKs.
-Vineet
Powered by blists - more mailing lists