LKML Archive on lore.kernel.org
 help / color / Atom feed
From: "Zi Yan" <zi.yan@cs.rutgers.edu>
To: "Andrew Morton" <akpm@linux-foundation.org>
Cc: "kbuild test robot" <lkp@intel.com>,
	kbuild-all@01.org, linux-kernel@vger.kernel.org,
	linux-mm@kvack.org, kirill.shutemov@linux.intel.com,
	minchan@kernel.org, vbabka@suse.cz, mgorman@techsingularity.net,
	mhocko@kernel.org, khandual@linux.vnet.ibm.com,
	dnellans@nvidia.com, dave.hansen@intel.com,
	n-horiguchi@ah.jp.nec.com
Subject: Re: [PATCH v9 05/10] mm: thp: enable thp migration in generic path
Date: Wed, 19 Jul 2017 22:54:04 -0400
Message-ID: <A0ABA698-7486-46C3-B209-E95A9048B22C@cs.rutgers.edu> (raw)
In-Reply-To: <20170719135927.d553f5afe893ca43d70cbdc5@linux-foundation.org>

On 19 Jul 2017, at 16:59, Andrew Morton wrote:

> On Wed, 19 Jul 2017 14:39:43 -0400 "Zi Yan" <zi.yan@cs.rutgers.edu> 
> wrote:
>
>> On 19 Jul 2017, at 4:04, kbuild test robot wrote:
>>
>>> Hi Zi,
>>>
>>> [auto build test WARNING on mmotm/master]
>>> [also build test WARNING on v4.13-rc1 next-20170718]
>>> [if your patch is applied to the wrong git tree, please drop us a 
>>> note to help improve the system]
>>>
>>> url:    
>>> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2F0day-ci%2Flinux%2Fcommits%2FZi-Yan%2Fmm-page-migration-enhancement-for-thp%2F20170718-095519&data=02%7C01%7Czi.yan%40cs.rutgers.edu%7Ca711ac47d4c0436ef66f08d4ce7cf30c%7Cb92d2b234d35447093ff69aca6632ffe%7C1%7C0%7C636360483431631457&sdata=NpxRpWbxe6o56xDJYpw1K6wgQo11IPCAbG2tE8l%2BU6E%3D&reserved=0
>>> base:   git://git.cmpxchg.org/linux-mmotm.git master
>>> config: xtensa-common_defconfig (attached as .config)
>>> compiler: xtensa-linux-gcc (GCC) 4.9.0
>>> reproduce:
>>>         wget 
>>> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fraw.githubusercontent.com%2F01org%2Flkp-tests%2Fmaster%2Fsbin%2Fmake.cross&data=02%7C01%7Czi.yan%40cs.rutgers.edu%7Ca711ac47d4c0436ef66f08d4ce7cf30c%7Cb92d2b234d35447093ff69aca6632ffe%7C1%7C0%7C636360483431631457&sdata=rBCfu0xUg3v%2B8r%2Be2tsiqRcqw%2FEZSTa4OtF0hU%2FqMbc%3D&reserved=0 
>>> -O ~/bin/make.cross
>>>         chmod +x ~/bin/make.cross
>>>         # save the attached .config to linux build tree
>>>         make.cross ARCH=xtensa
>>>
>>> All warnings (new ones prefixed by >>):
>>>
>>>    In file included from mm/vmscan.c:55:0:
>>>    include/linux/swapops.h: In function 'swp_entry_to_pmd':
>>>>> include/linux/swapops.h:220:2: warning: missing braces around 
>>>>> initializer [-Wmissing-braces]
>>>      return (pmd_t){ 0 };
>>>      ^
>>>    include/linux/swapops.h:220:2: warning: (near initialization for 
>>> '(anonymous).pud') [-Wmissing-braces]
>>>
>>> vim +220 include/linux/swapops.h
>>>
>>>    217	
>>>    218	static inline pmd_t swp_entry_to_pmd(swp_entry_t entry)
>>>    219	{
>>>> 220		return (pmd_t){ 0 };
>>>    221	}
>>>    222	
>>
>> It is a GCC 4.9.0 bug: 
>> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgcc.gnu.org%2Fbugzilla%2Fshow_bug.cgi%3Fid%3D53119&data=02%7C01%7Czi.yan%40cs.rutgers.edu%7C07c903c4f1444958942508d4cee90ca7%7Cb92d2b234d35447093ff69aca6632ffe%7C1%7C0%7C636360947714283172&sdata=84%2BXG7hglTCsTjGA8G3jyL7%2BFupkQaMkjAwzofffA5A%3D&reserved=0
>>
>> Upgrading GCC can get rid of this warning.
>
> I think there was a workaround for this, but I don't recall what it
> was.
>
> This suppressed the warning:
>
> --- a/include/linux/swapops.h~a
> +++ a/include/linux/swapops.h
> @@ -217,7 +217,7 @@ static inline swp_entry_t pmd_to_swp_ent
>
>  static inline pmd_t swp_entry_to_pmd(swp_entry_t entry)
>  {
> -	return (pmd_t){ 0 };
> +	return (pmd_t){};
>  }
>
>  static inline int is_pmd_migration_entry(pmd_t pmd)
>
> But I don't know if this is the approved workaround and I don't know
> what it will do at runtime!
>
> But we should fix this.  Expecting zillions of people to update their
> compiler version isn't nice.


How about this one?

--- a/include/linux/swapops.h
+++ b/include/linux/swapops.h
@@ -219,7 +219,7 @@ static inline swp_entry_t pmd_to_swp_entry(pmd_t 
pmd)

  static inline pmd_t swp_entry_to_pmd(swp_entry_t entry)
  {
-       return (pmd_t){ 0 };
+       return __pmd(0);
  }

  static inline int is_pmd_migration_entry(pmd_t pmd)


No warning or error was present during i386 kernel compilations
with gcc-4.9.3 or gcc-6.4.0. i386 gcc should share the same front-end
as xtensa-linux-gcc.

__pmd() should be the standard way of making pmd entries, right?


--
Best Regards
Yan Zi

  reply index

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-17 19:39 [PATCH v9 00/10] mm: page migration enhancement for thp Zi Yan
2017-07-17 19:39 ` [PATCH v9 01/10] mm: mempolicy: add queue_pages_required() Zi Yan
2017-07-17 19:39 ` [PATCH v9 02/10] mm: x86: move _PAGE_SWP_SOFT_DIRTY from bit 7 to bit 1 Zi Yan
2017-07-17 19:39 ` [PATCH v9 03/10] mm: thp: introduce separate TTU flag for thp freezing Zi Yan
2017-07-17 19:39 ` [PATCH v9 04/10] mm: thp: introduce CONFIG_ARCH_ENABLE_THP_MIGRATION Zi Yan
2017-07-17 19:39 ` [PATCH v9 05/10] mm: thp: enable thp migration in generic path Zi Yan
2017-07-19  8:04   ` kbuild test robot
2017-07-19 18:39     ` Zi Yan
2017-07-19 20:59       ` Andrew Morton
2017-07-20  2:54         ` Zi Yan [this message]
2017-07-17 19:39 ` [PATCH v9 06/10] mm: thp: check pmd migration entry in common path Zi Yan
2017-07-19  8:02   ` Michal Hocko
2017-07-19 15:01     ` Zi Yan
2017-07-17 19:39 ` [PATCH v9 07/10] mm: soft-dirty: keep soft-dirty bits over thp migration Zi Yan
2017-07-17 19:39 ` [PATCH v9 08/10] mm: mempolicy: mbind and migrate_pages support " Zi Yan
2017-07-17 19:39 ` [PATCH v9 09/10] mm: migrate: move_pages() supports " Zi Yan
2017-07-17 19:39 ` [PATCH v9 10/10] mm: memory_hotplug: memory hotremove " Zi Yan

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=A0ABA698-7486-46C3-B209-E95A9048B22C@cs.rutgers.edu \
    --to=zi.yan@cs.rutgers.edu \
    --cc=akpm@linux-foundation.org \
    --cc=dave.hansen@intel.com \
    --cc=dnellans@nvidia.com \
    --cc=kbuild-all@01.org \
    --cc=khandual@linux.vnet.ibm.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lkp@intel.com \
    --cc=mgorman@techsingularity.net \
    --cc=mhocko@kernel.org \
    --cc=minchan@kernel.org \
    --cc=n-horiguchi@ah.jp.nec.com \
    --cc=vbabka@suse.cz \
    /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

LKML Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/lkml/0 lkml/git/0.git
	git clone --mirror https://lore.kernel.org/lkml/1 lkml/git/1.git
	git clone --mirror https://lore.kernel.org/lkml/2 lkml/git/2.git
	git clone --mirror https://lore.kernel.org/lkml/3 lkml/git/3.git
	git clone --mirror https://lore.kernel.org/lkml/4 lkml/git/4.git
	git clone --mirror https://lore.kernel.org/lkml/5 lkml/git/5.git
	git clone --mirror https://lore.kernel.org/lkml/6 lkml/git/6.git
	git clone --mirror https://lore.kernel.org/lkml/7 lkml/git/7.git
	git clone --mirror https://lore.kernel.org/lkml/8 lkml/git/8.git
	git clone --mirror https://lore.kernel.org/lkml/9 lkml/git/9.git
	git clone --mirror https://lore.kernel.org/lkml/10 lkml/git/10.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 lkml lkml/ https://lore.kernel.org/lkml \
		linux-kernel@vger.kernel.org
	public-inbox-index lkml

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-kernel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git