From: kernel test robot <lkp@intel.com>
To: Alexei Starovoitov <alexei.starovoitov@gmail.com>
Cc: oe-kbuild-all@lists.linux.dev
Subject: Re: [PATCH bpf-next v9 4/6] memcg: Use trylock to access memcg stock_lock.
Date: Sun, 23 Feb 2025 11:53:51 +0800 [thread overview]
Message-ID: <202502231159.uI2OsAAB-lkp@intel.com> (raw)
In-Reply-To: <20250222024427.30294-5-alexei.starovoitov@gmail.com>
Hi Alexei,
kernel test robot noticed the following build warnings:
[auto build test WARNING on bpf-next/master]
url: https://github.com/intel-lab-lkp/linux/commits/Alexei-Starovoitov/locking-local_lock-Introduce-localtry_lock_t/20250222-104619
base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
patch link: https://lore.kernel.org/r/20250222024427.30294-5-alexei.starovoitov%40gmail.com
patch subject: [PATCH bpf-next v9 4/6] memcg: Use trylock to access memcg stock_lock.
config: x86_64-buildonly-randconfig-003-20250223 (https://download.01.org/0day-ci/archive/20250223/202502231159.uI2OsAAB-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250223/202502231159.uI2OsAAB-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202502231159.uI2OsAAB-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> mm/memcontrol.c:1778: warning: Function parameter or struct member 'gfp_mask' not described in 'consume_stock'
vim +1778 mm/memcontrol.c
cdec2e4265dfa09 KAMEZAWA Hiroyuki 2009-12-15 1760
567511462387230 Sebastian Andrzej Siewior 2022-03-22 1761 static struct obj_cgroup *drain_obj_stock(struct memcg_stock_pcp *stock);
bf4f059954dcb22 Roman Gushchin 2020-08-06 1762 static bool obj_stock_flush_required(struct memcg_stock_pcp *stock,
bf4f059954dcb22 Roman Gushchin 2020-08-06 1763 struct mem_cgroup *root_memcg);
bf4f059954dcb22 Roman Gushchin 2020-08-06 1764
a0956d54492eb72 Suleiman Souhlal 2012-12-18 1765 /**
a0956d54492eb72 Suleiman Souhlal 2012-12-18 1766 * consume_stock: Try to consume stocked charge on this cpu.
a0956d54492eb72 Suleiman Souhlal 2012-12-18 1767 * @memcg: memcg to consume from.
a0956d54492eb72 Suleiman Souhlal 2012-12-18 1768 * @nr_pages: how many pages to charge.
a0956d54492eb72 Suleiman Souhlal 2012-12-18 1769 *
a0956d54492eb72 Suleiman Souhlal 2012-12-18 1770 * The charges will only happen if @memcg matches the current cpu's memcg
a0956d54492eb72 Suleiman Souhlal 2012-12-18 1771 * stock, and at least @nr_pages are available in that stock. Failure to
a0956d54492eb72 Suleiman Souhlal 2012-12-18 1772 * service an allocation will refill the stock.
a0956d54492eb72 Suleiman Souhlal 2012-12-18 1773 *
a0956d54492eb72 Suleiman Souhlal 2012-12-18 1774 * returns true if successful, false otherwise.
cdec2e4265dfa09 KAMEZAWA Hiroyuki 2009-12-15 1775 */
416c592ed9773a3 Alexei Starovoitov 2025-02-21 1776 static bool consume_stock(struct mem_cgroup *memcg, unsigned int nr_pages,
416c592ed9773a3 Alexei Starovoitov 2025-02-21 1777 gfp_t gfp_mask)
cdec2e4265dfa09 KAMEZAWA Hiroyuki 2009-12-15 @1778 {
cdec2e4265dfa09 KAMEZAWA Hiroyuki 2009-12-15 1779 struct memcg_stock_pcp *stock;
1872b3bcd5874b5 Breno Leitao 2024-05-01 1780 unsigned int stock_pages;
db2ba40c277dc54 Johannes Weiner 2016-09-19 1781 unsigned long flags;
3e32cb2e0a12b69 Johannes Weiner 2014-12-10 1782 bool ret = false;
cdec2e4265dfa09 KAMEZAWA Hiroyuki 2009-12-15 1783
a983b5ebee57209 Johannes Weiner 2018-01-31 1784 if (nr_pages > MEMCG_CHARGE_BATCH)
3e32cb2e0a12b69 Johannes Weiner 2014-12-10 1785 return ret;
a0956d54492eb72 Suleiman Souhlal 2012-12-18 1786
416c592ed9773a3 Alexei Starovoitov 2025-02-21 1787 if (!localtry_trylock_irqsave(&memcg_stock.stock_lock, flags)) {
416c592ed9773a3 Alexei Starovoitov 2025-02-21 1788 if (!gfpflags_allow_spinning(gfp_mask))
416c592ed9773a3 Alexei Starovoitov 2025-02-21 1789 return ret;
416c592ed9773a3 Alexei Starovoitov 2025-02-21 1790 localtry_lock_irqsave(&memcg_stock.stock_lock, flags);
416c592ed9773a3 Alexei Starovoitov 2025-02-21 1791 }
db2ba40c277dc54 Johannes Weiner 2016-09-19 1792
db2ba40c277dc54 Johannes Weiner 2016-09-19 1793 stock = this_cpu_ptr(&memcg_stock);
1872b3bcd5874b5 Breno Leitao 2024-05-01 1794 stock_pages = READ_ONCE(stock->nr_pages);
1872b3bcd5874b5 Breno Leitao 2024-05-01 1795 if (memcg == READ_ONCE(stock->cached) && stock_pages >= nr_pages) {
1872b3bcd5874b5 Breno Leitao 2024-05-01 1796 WRITE_ONCE(stock->nr_pages, stock_pages - nr_pages);
3e32cb2e0a12b69 Johannes Weiner 2014-12-10 1797 ret = true;
3e32cb2e0a12b69 Johannes Weiner 2014-12-10 1798 }
db2ba40c277dc54 Johannes Weiner 2016-09-19 1799
416c592ed9773a3 Alexei Starovoitov 2025-02-21 1800 localtry_unlock_irqrestore(&memcg_stock.stock_lock, flags);
db2ba40c277dc54 Johannes Weiner 2016-09-19 1801
cdec2e4265dfa09 KAMEZAWA Hiroyuki 2009-12-15 1802 return ret;
cdec2e4265dfa09 KAMEZAWA Hiroyuki 2009-12-15 1803 }
cdec2e4265dfa09 KAMEZAWA Hiroyuki 2009-12-15 1804
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2025-02-23 3:55 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-22 2:44 [PATCH bpf-next v9 0/6] bpf, mm: Introduce try_alloc_pages() Alexei Starovoitov
2025-02-22 2:44 ` [PATCH bpf-next v9 1/6] locking/local_lock: Introduce localtry_lock_t Alexei Starovoitov
2025-03-11 15:44 ` Mateusz Guzik
2025-03-11 16:20 ` Sebastian Andrzej Siewior
2025-03-11 16:31 ` Mateusz Guzik
2025-03-11 20:21 ` Vlastimil Babka
2025-03-11 22:24 ` Alexei Starovoitov
2025-03-12 8:29 ` Vlastimil Babka
2025-03-14 21:05 ` Alexei Starovoitov
2025-03-14 21:08 ` Vlastimil Babka
2025-03-14 21:18 ` Alexei Starovoitov
2025-02-22 2:44 ` [PATCH bpf-next v9 2/6] mm, bpf: Introduce try_alloc_pages() for opportunistic page allocation Alexei Starovoitov
2025-02-23 2:17 ` kernel test robot
2025-03-11 2:04 ` Andrew Morton
2025-03-11 13:32 ` Alexei Starovoitov
2025-03-11 18:04 ` Mateusz Guzik
2025-03-12 9:45 ` Steven Rostedt
2025-03-15 0:34 ` Alexei Starovoitov
2025-03-12 10:00 ` Vlastimil Babka
2025-03-12 19:06 ` Shakeel Butt
2025-03-13 8:44 ` Michal Hocko
2025-03-13 14:21 ` Vlastimil Babka
2025-03-13 16:02 ` Shakeel Butt
2025-03-14 10:16 ` Michal Hocko
2025-03-15 0:51 ` Alexei Starovoitov
2025-02-22 2:44 ` [PATCH bpf-next v9 3/6] mm, bpf: Introduce free_pages_nolock() Alexei Starovoitov
2025-02-23 3:00 ` kernel test robot
2025-02-22 2:44 ` [PATCH bpf-next v9 4/6] memcg: Use trylock to access memcg stock_lock Alexei Starovoitov
2025-02-23 3:53 ` kernel test robot [this message]
2025-02-22 2:44 ` [PATCH bpf-next v9 5/6] mm, bpf: Use memcg in try_alloc_pages() Alexei Starovoitov
2025-02-22 2:44 ` [PATCH bpf-next v9 6/6] bpf: Use try_alloc_pages() to allocate pages for bpf needs Alexei Starovoitov
2025-02-26 3:19 ` [PATCH bpf-next v9 0/6] bpf, mm: Introduce try_alloc_pages() Alexei Starovoitov
2025-02-27 17:50 ` patchwork-bot+netdevbpf
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=202502231159.uI2OsAAB-lkp@intel.com \
--to=lkp@intel.com \
--cc=alexei.starovoitov@gmail.com \
--cc=oe-kbuild-all@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.