[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87blbhzygm.fsf@nanos.tec.linutronix.de>
Date: Wed, 17 Mar 2021 14:44:41 +0100
From: Thomas Gleixner <tglx@...utronix.de>
To: Ira Weiny <ira.weiny@...el.com>,
Oliver Sang <oliver.sang@...el.com>
Cc: Chaitanya Kulkarni <Chaitanya.Kulkarni@....com>,
David Sterba <dsterba@...e.com>,
Andrew Morton <akpm@...ux-foundation.org>,
"hch\@infradead.org" <hch@...radead.org>,
Christoph Hellwig <hch@....de>,
LKML <linux-kernel@...r.kernel.org>,
"lkp\@lists.01.org" <lkp@...ts.01.org>,
"lkp\@intel.com" <lkp@...el.com>,
Xing Zhengjun <zhengjun.xing@...ux.intel.com>
Subject: Re: [mm/highmem] 61b205f579: WARNING:at_mm/highmem.c:#__kmap_local_sched_out
On Tue, Mar 16 2021 at 00:37, Ira Weiny wrote:
>
> I think I see the issue. I think this is an invalid configuration.
>
> 00:26:43 > grep DEBUG_KMAP config-5.11.0-rc7-00002-g61b205f57991
> CONFIG_DEBUG_KMAP_LOCAL=y
> CONFIG_DEBUG_KMAP_LOCAL_FORCE_MAP=y
>
> 00:26:48 > grep DEBUG_HIGHMEM config-5.11.0-rc7-00002-g61b205f57991
> # CONFIG_DEBUG_HIGHMEM is not set
No. It's valid so you can test that crap on 64bit.
> DEBUG_KMAP_LOCAL causes guard pages to be added to the kmap_ctrl array. But
> DEBUG_HIGHMEM is used in __kmap_local_sched_out() to check the guard pages.
>
> DEBUG_HIGHMEM is supposed to select DEBUG_KMAP_LOCAL... but apparently that
> did not happen when this configuration was made.
>
> I still have not hit this condition in my testing. Could you ensure that
> DEBUG_HIGMEM is set and rerun the test to see if I am correct?
Why? The whole point of CONFIG_DEBUG_KMAP_LOCAL_FORCE_MAP is to allow
testing of this kmap_local/atomic stuff w/o HIGHMEM, e.g. on 64 bit.
> Thomas wouldn't the following enable checks make more sense? Or perhaps be
> more consistent with the processing of kmap_ctrl?
Neither nor. It's simply required to make DEBUG_KMAP_LOCAL=y &&
HIGHMEM=n case work.
Please add:
Fixes: 0e91a0c6984c ("mm/highmem: Provide CONFIG_DEBUG_KMAP_LOCAL_FORCE_MAP")
which should have contained exactly that change:
> - if (IS_ENABLED(CONFIG_DEBUG_HIGHMEM) && !(i & 0x01)) {
> + if (IS_ENABLED(CONFIG_DEBUG_KMAP_LOCAL) && !(i & 0x01)) {
> WARN_ON_ONCE(!pte_none(pteval));
> continue;
> }
> @@ -654,7 +654,7 @@ void __kmap_local_sched_in(void)
> int idx;
>
> /* With debug all even slots are unmapped and act as guard */
> - if (IS_ENABLED(CONFIG_DEBUG_HIGHMEM) && !(i & 0x01)) {
> + if (IS_ENABLED(CONFIG_DEBUG_KMAP_LOCAL) && !(i & 0x01)) {
> WARN_ON_ONCE(!pte_none(pteval));
> continue;
> }
Thanks,
tglx
Powered by blists - more mailing lists