[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHk-=wh4waroKr-Xtcv+5pTxBcHxGEj-g73eQvXVawML_C0EXw@mail.gmail.com>
Date: Wed, 9 Oct 2019 09:21:08 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: "Kirill A. Shutemov" <kirill@...temov.name>
Cc: Thomas Hellström (VMware)
<thomas_os@...pmail.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Linux-MM <linux-mm@...ck.org>,
Thomas Hellstrom <thellstrom@...are.com>,
Matthew Wilcox <willy@...radead.org>,
Will Deacon <will.deacon@....com>,
Peter Zijlstra <peterz@...radead.org>,
Rik van Riel <riel@...riel.com>,
Minchan Kim <minchan@...nel.org>,
Michal Hocko <mhocko@...e.com>,
Huang Ying <ying.huang@...el.com>,
Jérôme Glisse <jglisse@...hat.com>
Subject: Re: [PATCH v4 3/9] mm: pagewalk: Don't split transhuge pmds when a
pmd_entry is present
On Wed, Oct 9, 2019 at 8:27 AM Kirill A. Shutemov <kirill@...temov.name> wrote:
>
> Do we have any current user that expect split_huge_pmd() in this scenario.
No. There are no current users of the pmd callback and the pte
callback at all, that I could find.
But it looks like the new drm use does want a "I can't handle the
hugepage, please split it and I'll fo the ptes instead".
> That's hacky.
>
> Maybe just use an error code for this? -EAGAIN?
I actually like the PAGE_WALK_FALLBACK thing as more documentation
than "it's an error, but not one you return", although I do detest the
particular value chosen, which is just a nasty bitpattern.
Maybe it could use an error value, just one that makes no sense, and
is hidden by the PAGE_WALK_FALLBACK define, ie something like
#define PAGE_WALK_FALLBACK (-ECHILD)
or something like that.
And I suspect the conditional would be cleaner if it was written something like
if (!err)
continue;
if (err != PAGE_WALK_FALLBACK)
break;
err = 0;
if (pmd_trans_unstable(pmd))
goto again;
.. do the split ..
and skip the WARN_ON() and the odd "non-zero but smaller than MAX test"
Linus
Powered by blists - more mailing lists