linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Naoya Horiguchi <naoya.horiguchi@linux.dev>
To: kernel test robot <lkp@intel.com>
Cc: linux-mm@kvack.org, kbuild-all@lists.01.org,
	Andrew Morton <akpm@linux-foundation.org>,
	David Hildenbrand <david@redhat.com>,
	Oscar Salvador <osalvador@suse.de>,
	Michal Hocko <mhocko@suse.com>, Ding Hui <dinghui@sangfor.com.cn>,
	Tony Luck <tony.luck@intel.com>,
	"Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>,
	Miaohe Lin <linmiaohe@huawei.com>
Subject: Re: [PATCH v3 3/3] mm/hwpoison: fix unpoison_memory()
Date: Wed, 10 Nov 2021 11:48:19 +0900	[thread overview]
Message-ID: <20211110024819.GA3407501@u2004> (raw)
In-Reply-To: <202111070746.4o7PrdFj-lkp@intel.com>

On Sun, Nov 07, 2021 at 07:25:13AM +0800, kernel test robot wrote:
> Hi Naoya,
> 
> I love your patch! Yet something to improve:
> 
> [auto build test ERROR on hnaz-mm/master]
> 
> url:    https://github.com/0day-ci/linux/commits/Naoya-Horiguchi/mm-hwpoison-fix-unpoison_memory/20211105-135311
> base:   https://github.com/hnaz/linux-mm master
> config: i386-allyesconfig (attached as .config)
> compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
> reproduce (this is a W=1 build):
>         # https://github.com/0day-ci/linux/commit/1b78bd027ee061f9378cf47687f9f4649a160fa4
>         git remote add linux-review https://github.com/0day-ci/linux
>         git fetch --no-tags linux-review Naoya-Horiguchi/mm-hwpoison-fix-unpoison_memory/20211105-135311
>         git checkout 1b78bd027ee061f9378cf47687f9f4649a160fa4
>         # save the attached .config to linux build tree
>         make W=1 ARCH=i386 

I can't reproduce the same error with the above procedure (maybe because I
use newer version of gcc?), but anyway I suspect that memory-failure.c
should be compiled for i386 (which should not support software-recoverable
memory error).

X86_SUPPORTS_MEMORY_FAILURE depends on (X86_64 || !SPARSEMEM) in arch/x86/Kconfig,
where according to commit d949f36f1865 ("x86: Fix hwpoison code related build
failure on 32-bit NUMAQ"), dependency on !SPRASEMEM is just to avoid exhaustion of
page flag field. So I'm thinking of fixing this error by removing the dependency
on !SPARSEMEM like below.


diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index bc9503674249..9a047cb71bba 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -717,11 +717,10 @@ config X86_32_NON_STANDARD
 config X86_SUPPORTS_MEMORY_FAILURE
        def_bool y
        # MCE code calls memory_failure():
        depends on X86_MCE
-       # On 32-bit this adds too big of NODES_SHIFT and we run out of page flags:
-       # On 32-bit SPARSEMEM adds too big of SECTIONS_WIDTH:
-       depends on X86_64 || !SPARSEMEM
+       # On 32-bit software recoverable memory error is not supported:
+       depends on X86_64
        select ARCH_SUPPORTS_MEMORY_FAILURE

 config STA2X11
        bool "STA2X11 Companion Chip Support"


> 
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>

I'll add the tag. Thank you for the report.

- Naoya Horiguchi

> 
> All errors (new ones prefixed by >>):
> 
>    In file included from include/linux/mmzone.h:22,
>                     from include/linux/gfp.h:6,
>                     from include/linux/mm.h:10,
>                     from mm/memory-failure.c:37:
>    mm/memory-failure.c: In function 'SetPageHWPoisonTakenOff':
> >> include/linux/page-flags.h:525:24: error: unsigned conversion from 'long long int' to 'long unsigned int' changes value from '5212723395167473486' to '1230196558' [-Werror=overflow]
>      525 | #define MAGIC_HWPOISON 0x4857504f49534f4e
>          |                        ^~~~~~~~~~~~~~~~~~
>    mm/memory-failure.c:1170:25: note: in expansion of macro 'MAGIC_HWPOISON'
>     1170 |  set_page_private(page, MAGIC_HWPOISON);
>          |                         ^~~~~~~~~~~~~~
>    cc1: all warnings being treated as errors
> 
> 
> vim +525 include/linux/page-flags.h
> 
>    520	
>    521	#ifdef CONFIG_MEMORY_FAILURE
>    522	PAGEFLAG(HWPoison, hwpoison, PF_ANY)
>    523	TESTSCFLAG(HWPoison, hwpoison, PF_ANY)
>    524	#define __PG_HWPOISON (1UL << PG_hwpoison)
>  > 525	#define MAGIC_HWPOISON	0x4857504f49534f4e
>    526	extern void SetPageHWPoisonTakenOff(struct page *page);
>    527	extern void ClearPageHWPoisonTakenOff(struct page *page);
>    528	extern bool take_page_off_buddy(struct page *page);
>    529	extern bool put_page_back_buddy(struct page *page);
>    530	#else
>    531	PAGEFLAG_FALSE(HWPoison, hwpoison)
>    532	#define __PG_HWPOISON 0
>    533	#endif
>    534	
> 
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org



  reply	other threads:[~2021-11-10  2:48 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-05  5:50 [PATCH v3 0/3] " Naoya Horiguchi
2021-11-05  5:50 ` [PATCH v3 1/3] mm/hwpoison: mf_mutex for soft offline and unpoison Naoya Horiguchi
2021-11-05 18:23   ` Yang Shi
2021-11-07 23:48     ` HORIGUCHI NAOYA(堀口 直也)
2021-11-05  5:50 ` [PATCH v3 2/3] mm/hwpoison: remove MF_MSG_BUDDY_2ND and MF_MSG_POISONED_HUGE Naoya Horiguchi
2021-11-05  5:50 ` [PATCH v3 3/3] mm/hwpoison: fix unpoison_memory() Naoya Horiguchi
2021-11-06 23:25   ` kernel test robot
2021-11-10  2:48     ` Naoya Horiguchi [this message]
2021-11-08 23:27   ` Yang Shi
2021-11-09  0:53     ` Naoya Horiguchi
2021-11-09  1:03       ` Yang Shi
2021-11-05 10:58 ` [PATCH v3 0/3] " David Hildenbrand
2021-11-05 11:49   ` Naoya Horiguchi
2021-11-05 13:02     ` David Hildenbrand

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=20211110024819.GA3407501@u2004 \
    --to=naoya.horiguchi@linux.dev \
    --cc=akpm@linux-foundation.org \
    --cc=aneesh.kumar@linux.vnet.ibm.com \
    --cc=david@redhat.com \
    --cc=dinghui@sangfor.com.cn \
    --cc=kbuild-all@lists.01.org \
    --cc=linmiaohe@huawei.com \
    --cc=linux-mm@kvack.org \
    --cc=lkp@intel.com \
    --cc=mhocko@suse.com \
    --cc=osalvador@suse.de \
    --cc=tony.luck@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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