linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Daniel Vetter <daniel.vetter@ffwll.ch>,
	LKML <linux-kernel@vger.kernel.org>
Cc: kbuild-all@lists.01.org,
	Intel Graphics Development <intel-gfx@lists.freedesktop.org>,
	Daniel Vetter <daniel.vetter@ffwll.ch>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linux Memory Management List <linux-mm@kvack.org>
Subject: Re: [PATCH 2/2] bdi: Use might_alloc()
Date: Thu, 14 Jan 2021 13:07:43 +0800	[thread overview]
Message-ID: <202101141315.O3VGrlrw-lkp@intel.com> (raw)
In-Reply-To: <20210113135009.3606813-2-daniel.vetter@ffwll.ch>

[-- Attachment #1: Type: text/plain, Size: 3852 bytes --]

Hi Daniel,

I love your patch! Yet something to improve:

[auto build test ERROR on mmotm/master]

url:    https://github.com/0day-ci/linux/commits/Daniel-Vetter/mm-dmapool-Use-might_alloc/20210113-215207
base:   git://git.cmpxchg.org/linux-mmotm.git master
config: openrisc-randconfig-r011-20210113 (attached as .config)
compiler: or1k-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/0day-ci/linux/commit/95ad71591084350229e768f9c2be5350d504f896
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Daniel-Vetter/mm-dmapool-Use-might_alloc/20210113-215207
        git checkout 95ad71591084350229e768f9c2be5350d504f896
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=openrisc 

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

All errors (new ones prefixed by >>):

   mm/backing-dev.c: In function 'wb_get_create':
>> mm/backing-dev.c:647:2: error: implicit declaration of function 'might_alloc'; did you mean 'might_lock'? [-Werror=implicit-function-declaration]
     647 |  might_alloc(gfp);
         |  ^~~~~~~~~~~
         |  might_lock
   cc1: some warnings being treated as errors


vim +647 mm/backing-dev.c

   616	
   617	/**
   618	 * wb_get_create - get wb for a given memcg, create if necessary
   619	 * @bdi: target bdi
   620	 * @memcg_css: cgroup_subsys_state of the target memcg (must have positive ref)
   621	 * @gfp: allocation mask to use
   622	 *
   623	 * Try to get the wb for @memcg_css on @bdi.  If it doesn't exist, try to
   624	 * create one.  The returned wb has its refcount incremented.
   625	 *
   626	 * This function uses css_get() on @memcg_css and thus expects its refcnt
   627	 * to be positive on invocation.  IOW, rcu_read_lock() protection on
   628	 * @memcg_css isn't enough.  try_get it before calling this function.
   629	 *
   630	 * A wb is keyed by its associated memcg.  As blkcg implicitly enables
   631	 * memcg on the default hierarchy, memcg association is guaranteed to be
   632	 * more specific (equal or descendant to the associated blkcg) and thus can
   633	 * identify both the memcg and blkcg associations.
   634	 *
   635	 * Because the blkcg associated with a memcg may change as blkcg is enabled
   636	 * and disabled closer to root in the hierarchy, each wb keeps track of
   637	 * both the memcg and blkcg associated with it and verifies the blkcg on
   638	 * each lookup.  On mismatch, the existing wb is discarded and a new one is
   639	 * created.
   640	 */
   641	struct bdi_writeback *wb_get_create(struct backing_dev_info *bdi,
   642					    struct cgroup_subsys_state *memcg_css,
   643					    gfp_t gfp)
   644	{
   645		struct bdi_writeback *wb;
   646	
 > 647		might_alloc(gfp);
   648	
   649		if (!memcg_css->parent)
   650			return &bdi->wb;
   651	
   652		do {
   653			rcu_read_lock();
   654			wb = radix_tree_lookup(&bdi->cgwb_tree, memcg_css->id);
   655			if (wb) {
   656				struct cgroup_subsys_state *blkcg_css;
   657	
   658				/* see whether the blkcg association has changed */
   659				blkcg_css = cgroup_get_e_css(memcg_css->cgroup,
   660							     &io_cgrp_subsys);
   661				if (unlikely(wb->blkcg_css != blkcg_css ||
   662					     !wb_tryget(wb)))
   663					wb = NULL;
   664				css_put(blkcg_css);
   665			}
   666			rcu_read_unlock();
   667		} while (!wb && !cgwb_create(bdi, memcg_css, gfp));
   668	
   669		return wb;
   670	}
   671	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 19846 bytes --]

  reply	other threads:[~2021-01-14  5:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-13 13:50 [PATCH 1/2] mm/dmapool: " Daniel Vetter
2021-01-13 13:50 ` [PATCH 2/2] bdi: " Daniel Vetter
2021-01-14  5:07   ` kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-01-13 13:40 [PATCH 1/2] mm/dmapool: " Daniel Vetter
2021-01-13 13:40 ` [PATCH 2/2] bdi: " Daniel Vetter

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=202101141315.O3VGrlrw-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=daniel.vetter@ffwll.ch \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    /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