linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Minchan Kim <minchan@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>
Cc: kbuild-all@lists.01.org,
	Linux Memory Management List <linux-mm@kvack.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Suren Baghdasaryan <surenb@google.com>,
	Michal Hocko <mhocko@suse.com>, John Dias <joaodias@google.com>,
	Tim Murray <timmurray@google.com>,
	Minchan Kim <minchan@kernel.org>
Subject: Re: [PATCH] mm: don't be stuck to rmap lock on reclaim path
Date: Wed, 4 May 2022 10:13:06 +0800	[thread overview]
Message-ID: <202205041057.a78ABZ95-lkp@intel.com> (raw)
In-Reply-To: <20220503170341.1413961-1-minchan@kernel.org>

Hi Minchan,

I love your patch! Perhaps something to improve:

[auto build test WARNING on hnaz-mm/master]

url:    https://github.com/intel-lab-lkp/linux/commits/Minchan-Kim/mm-don-t-be-stuck-to-rmap-lock-on-reclaim-path/20220504-010625
base:   https://github.com/hnaz/linux-mm master
config: x86_64-randconfig-a013 (https://download.01.org/0day-ci/archive/20220504/202205041057.a78ABZ95-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.2.0-20) 11.2.0
reproduce (this is a W=1 build):
        # https://github.com/intel-lab-lkp/linux/commit/0e190ce022ef259d63eb2cf50110b292ba17c79c
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Minchan-Kim/mm-don-t-be-stuck-to-rmap-lock-on-reclaim-path/20220504-010625
        git checkout 0e190ce022ef259d63eb2cf50110b292ba17c79c
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash

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

All warnings (new ones prefixed by >>):

   mm/page_idle.c: In function 'page_idle_clear_pte_refs':
>> mm/page_idle.c:106:26: warning: passing argument 2 of 'rmap_walk' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
     106 |         rmap_walk(folio, &rwc);
         |                          ^~~~
   In file included from mm/page_idle.c:11:
   include/linux/rmap.h:403:63: note: expected 'struct rmap_walk_control *' but argument is of type 'const struct rmap_walk_control *'
     403 | void rmap_walk(struct folio *folio, struct rmap_walk_control *rwc);
         |                                     ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~


vim +106 mm/page_idle.c

33c3fc71c8cfa3 Vladimir Davydov        2015-09-09   85  
33c3fc71c8cfa3 Vladimir Davydov        2015-09-09   86  static void page_idle_clear_pte_refs(struct page *page)
33c3fc71c8cfa3 Vladimir Davydov        2015-09-09   87  {
4aed23a2f8aaaa Matthew Wilcox (Oracle  2022-01-29   88) 	struct folio *folio = page_folio(page);
33c3fc71c8cfa3 Vladimir Davydov        2015-09-09   89  	/*
33c3fc71c8cfa3 Vladimir Davydov        2015-09-09   90  	 * Since rwc.arg is unused, rwc is effectively immutable, so we
33c3fc71c8cfa3 Vladimir Davydov        2015-09-09   91  	 * can make it static const to save some cycles and stack.
33c3fc71c8cfa3 Vladimir Davydov        2015-09-09   92  	 */
33c3fc71c8cfa3 Vladimir Davydov        2015-09-09   93  	static const struct rmap_walk_control rwc = {
33c3fc71c8cfa3 Vladimir Davydov        2015-09-09   94  		.rmap_one = page_idle_clear_pte_refs_one,
2f031c6f042cb8 Matthew Wilcox (Oracle  2022-01-29   95) 		.anon_lock = folio_lock_anon_vma_read,
33c3fc71c8cfa3 Vladimir Davydov        2015-09-09   96  	};
33c3fc71c8cfa3 Vladimir Davydov        2015-09-09   97  	bool need_lock;
33c3fc71c8cfa3 Vladimir Davydov        2015-09-09   98  
4aed23a2f8aaaa Matthew Wilcox (Oracle  2022-01-29   99) 	if (!folio_mapped(folio) || !folio_raw_mapping(folio))
33c3fc71c8cfa3 Vladimir Davydov        2015-09-09  100  		return;
33c3fc71c8cfa3 Vladimir Davydov        2015-09-09  101  
4aed23a2f8aaaa Matthew Wilcox (Oracle  2022-01-29  102) 	need_lock = !folio_test_anon(folio) || folio_test_ksm(folio);
4aed23a2f8aaaa Matthew Wilcox (Oracle  2022-01-29  103) 	if (need_lock && !folio_trylock(folio))
33c3fc71c8cfa3 Vladimir Davydov        2015-09-09  104  		return;
33c3fc71c8cfa3 Vladimir Davydov        2015-09-09  105  
84fbbe21894bb9 Matthew Wilcox (Oracle  2022-01-29 @106) 	rmap_walk(folio, &rwc);
33c3fc71c8cfa3 Vladimir Davydov        2015-09-09  107  
33c3fc71c8cfa3 Vladimir Davydov        2015-09-09  108  	if (need_lock)
4aed23a2f8aaaa Matthew Wilcox (Oracle  2022-01-29  109) 		folio_unlock(folio);
33c3fc71c8cfa3 Vladimir Davydov        2015-09-09  110  }
33c3fc71c8cfa3 Vladimir Davydov        2015-09-09  111  

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp


  reply	other threads:[~2022-05-04  2:13 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-03 17:03 [PATCH] mm: don't be stuck to rmap lock on reclaim path Minchan Kim
2022-05-04  2:13 ` kernel test robot [this message]
2022-05-04  3:24 ` kernel test robot
2022-05-04  3:32 ` Matthew Wilcox
2022-05-04  4:30   ` Minchan Kim
2022-05-04  6:09     ` Matthew Wilcox
2022-05-04 15:52       ` Minchan Kim
2022-05-04 16:55         ` Matthew Wilcox
2022-05-04 23:47           ` Minchan Kim
2022-05-05  0:42             ` Matthew Wilcox
2022-05-05  6:11               ` Minchan Kim
2022-05-17 23:58                 ` Andrew Morton

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=202205041057.a78ABZ95-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=joaodias@google.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.com \
    --cc=minchan@kernel.org \
    --cc=surenb@google.com \
    --cc=timmurray@google.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;
as well as URLs for NNTP newsgroup(s).