From: kbuild test robot <lkp@intel.com>
To: Waiman Long <longman@redhat.com>
Cc: kbuild-all@01.org, Alexander Viro <viro@zeniv.linux.org.uk>,
Jonathan Corbet <corbet@lwn.net>,
"Luis R. Rodriguez" <mcgrof@kernel.org>,
Kees Cook <keescook@chromium.org>,
linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
linux-mm@kvack.org, linux-doc@vger.kernel.org,
Linus Torvalds <torvalds@linux-foundation.org>,
Jan Kara <jack@suse.cz>,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
Andrew Morton <akpm@linux-foundation.org>,
Ingo Molnar <mingo@kernel.org>,
Miklos Szeredi <mszeredi@redhat.com>,
Matthew Wilcox <willy@infradead.org>,
Larry Woodman <lwoodman@redhat.com>,
James Bottomley <James.Bottomley@HansenPartnership.com>,
"Wangkai (Kevin C)" <wangkai86@huawei.com>,
Michal Hocko <mhocko@kernel.org>,
Waiman Long <longman@redhat.com>
Subject: Re: [PATCH v7 6/6] fs/dcache: Allow deconfiguration of negative dentry code to reduce kernel size
Date: Tue, 17 Jul 2018 09:25:36 +0800 [thread overview]
Message-ID: <20180717012535.GD10593@intel.com> (raw)
In-Reply-To: <1531413965-5401-7-git-send-email-longman@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 6472 bytes --]
Hi Waiman,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on linus/master]
[also build test ERROR on v4.18-rc4]
[cannot apply to next-20180713]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Waiman-Long/fs-dcache-Track-report-number-of-negative-dentries/20180714-161258
config: h8300-h8300h-sim_defconfig (attached as .config)
compiler: h8300-linux-gcc (GCC) 8.1.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=8.1.0 make.cross ARCH=h8300
:::::: branch date: 65 minutes ago
:::::: commit date: 65 minutes ago
All errors (new ones prefixed by >>):
fs/dcache.c: In function 'neg_dentry_inc_slowpath':
>> fs/dcache.c:374:8: error: implicit declaration of function 'get_nr_dentry_neg'; did you mean 'get_nr_dirty_inodes'? [-Werror=implicit-function-declaration]
cnt = get_nr_dentry_neg();
^~~~~~~~~~~~~~~~~
get_nr_dirty_inodes
cc1: some warnings being treated as errors
# https://github.com/0day-ci/linux/commit/ca68ee513a450445b269248c2859302c8931a294
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout ca68ee513a450445b269248c2859302c8931a294
vim +374 fs/dcache.c
bcc9ba8b Waiman Long 2018-07-12 311
2ccdd02c Waiman Long 2018-07-12 312 static noinline int neg_dentry_inc_slowpath(struct dentry *dentry)
bcc9ba8b Waiman Long 2018-07-12 313 {
bcc9ba8b Waiman Long 2018-07-12 314 long cnt = 0, *pcnt;
2aa8bf46 Waiman Long 2018-07-12 315 unsigned long current_time;
bcc9ba8b Waiman Long 2018-07-12 316
bcc9ba8b Waiman Long 2018-07-12 317 /*
bcc9ba8b Waiman Long 2018-07-12 318 * Try to move some negative dentry quota from the global free
bcc9ba8b Waiman Long 2018-07-12 319 * pool to the percpu count to allow more negative dentries to
bcc9ba8b Waiman Long 2018-07-12 320 * be added to the LRU.
bcc9ba8b Waiman Long 2018-07-12 321 */
bcc9ba8b Waiman Long 2018-07-12 322 pcnt = get_cpu_ptr(&nr_dentry_neg);
bcc9ba8b Waiman Long 2018-07-12 323 if ((READ_ONCE(ndblk.nfree) > 0) &&
bcc9ba8b Waiman Long 2018-07-12 324 (*pcnt > neg_dentry_percpu_limit)) {
bcc9ba8b Waiman Long 2018-07-12 325 cnt = __neg_dentry_nfree_dec(*pcnt - neg_dentry_percpu_limit);
bcc9ba8b Waiman Long 2018-07-12 326 *pcnt -= cnt;
bcc9ba8b Waiman Long 2018-07-12 327 }
bcc9ba8b Waiman Long 2018-07-12 328 put_cpu_ptr(&nr_dentry_neg);
bcc9ba8b Waiman Long 2018-07-12 329
2aa8bf46 Waiman Long 2018-07-12 330 if (cnt)
2aa8bf46 Waiman Long 2018-07-12 331 goto out;
2aa8bf46 Waiman Long 2018-07-12 332
bcc9ba8b Waiman Long 2018-07-12 333 /*
2ccdd02c Waiman Long 2018-07-12 334 * Kill the dentry by setting the DCACHE_KILL_NEGATIVE flag and
2ccdd02c Waiman Long 2018-07-12 335 * dec the negative dentry count if the enforcing option is on.
2ccdd02c Waiman Long 2018-07-12 336 */
2ccdd02c Waiman Long 2018-07-12 337 if (neg_dentry_enforce) {
2ccdd02c Waiman Long 2018-07-12 338 dentry->d_flags |= DCACHE_KILL_NEGATIVE;
2ccdd02c Waiman Long 2018-07-12 339 this_cpu_dec(nr_dentry_neg);
2ccdd02c Waiman Long 2018-07-12 340
2ccdd02c Waiman Long 2018-07-12 341 /*
2ccdd02c Waiman Long 2018-07-12 342 * When the dentry is not put into the LRU, we
2ccdd02c Waiman Long 2018-07-12 343 * need to keep the reference count to 1 to
2ccdd02c Waiman Long 2018-07-12 344 * avoid problem when killing it.
2ccdd02c Waiman Long 2018-07-12 345 */
2ccdd02c Waiman Long 2018-07-12 346 WARN_ON_ONCE(dentry->d_lockref.count);
2ccdd02c Waiman Long 2018-07-12 347 dentry->d_lockref.count = 1;
2ccdd02c Waiman Long 2018-07-12 348 return -1; /* Kill the dentry now */
2ccdd02c Waiman Long 2018-07-12 349 }
2ccdd02c Waiman Long 2018-07-12 350
2ccdd02c Waiman Long 2018-07-12 351 /*
2aa8bf46 Waiman Long 2018-07-12 352 * Put out a warning every minute or so if there are just too many
2aa8bf46 Waiman Long 2018-07-12 353 * negative dentries.
bcc9ba8b Waiman Long 2018-07-12 354 */
2aa8bf46 Waiman Long 2018-07-12 355 current_time = jiffies;
bcc9ba8b Waiman Long 2018-07-12 356
2aa8bf46 Waiman Long 2018-07-12 357 if (current_time < ndblk.warn_jiffies + NEG_WARN_PERIOD)
2aa8bf46 Waiman Long 2018-07-12 358 goto out;
2aa8bf46 Waiman Long 2018-07-12 359 /*
2aa8bf46 Waiman Long 2018-07-12 360 * Update the time in ndblk.warn_jiffies and print a warning
2aa8bf46 Waiman Long 2018-07-12 361 * if time update is successful.
2aa8bf46 Waiman Long 2018-07-12 362 */
2aa8bf46 Waiman Long 2018-07-12 363 raw_spin_lock(&ndblk.nfree_lock);
2aa8bf46 Waiman Long 2018-07-12 364 if (current_time < ndblk.warn_jiffies + NEG_WARN_PERIOD) {
2aa8bf46 Waiman Long 2018-07-12 365 raw_spin_unlock(&ndblk.nfree_lock);
2aa8bf46 Waiman Long 2018-07-12 366 goto out;
2aa8bf46 Waiman Long 2018-07-12 367 }
2aa8bf46 Waiman Long 2018-07-12 368 ndblk.warn_jiffies = current_time;
2aa8bf46 Waiman Long 2018-07-12 369 raw_spin_unlock(&ndblk.nfree_lock);
2aa8bf46 Waiman Long 2018-07-12 370
2aa8bf46 Waiman Long 2018-07-12 371 /*
2aa8bf46 Waiman Long 2018-07-12 372 * Get the current negative dentry count & print a warning.
2aa8bf46 Waiman Long 2018-07-12 373 */
2aa8bf46 Waiman Long 2018-07-12 @374 cnt = get_nr_dentry_neg();
2aa8bf46 Waiman Long 2018-07-12 375 pr_warn("Warning: Too many negative dentries (%ld). "
2ccdd02c Waiman Long 2018-07-12 376 "This warning can be disabled by writing 0 to \"fs/neg-dentry-limit\", increasing the limit or writing 1 to \"fs/neg-dentry-enforce\".\n",
2aa8bf46 Waiman Long 2018-07-12 377 cnt);
2aa8bf46 Waiman Long 2018-07-12 378 out:
2ccdd02c Waiman Long 2018-07-12 379 return 0;
bcc9ba8b Waiman Long 2018-07-12 380 }
bcc9ba8b Waiman Long 2018-07-12 381
:::::: The code at line 374 was first introduced by commit
:::::: 2aa8bf4658af0dbc07ae9ea07d04937a347e3ef4 fs/dcache: Print negative dentry warning every min until turned off by user
:::::: TO: Waiman Long <longman@redhat.com>
:::::: CC: 0day robot <lkp@intel.com>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 4383 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: kbuild test robot <lkp@intel.com>
To: Waiman Long <longman@redhat.com>
Cc: kbuild-all@01.org, Alexander Viro <viro@zeniv.linux.org.uk>,
Jonathan Corbet <corbet@lwn.net>,
"Luis R. Rodriguez" <mcgrof@kernel.org>,
Kees Cook <keescook@chromium.org>,
linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
linux-mm@kvack.org, linux-doc@vger.kernel.org,
Linus Torvalds <torvalds@linux-foundation.org>,
Jan Kara <jack@suse.cz>,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
Andrew Morton <akpm@linux-foundation.org>,
Ingo Molnar <mingo@kernel.org>,
Miklos Szeredi <mszeredi@redhat.com>,
Matthew Wilcox <willy@infradead.org>,
Larry Woodman <lwoodman@redhat.com>,
James Bottomley <James.Bottomley@HansenPartnership.com>,
"Wangkai (Kevin C)" <wangkai86@huawei.com>,
Michal Hocko <mhocko@kernel.org>
Subject: Re: [PATCH v7 6/6] fs/dcache: Allow deconfiguration of negative dentry code to reduce kernel size
Date: Tue, 17 Jul 2018 09:25:36 +0800 [thread overview]
Message-ID: <20180717012535.GD10593@intel.com> (raw)
In-Reply-To: <1531413965-5401-7-git-send-email-longman@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 6472 bytes --]
Hi Waiman,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on linus/master]
[also build test ERROR on v4.18-rc4]
[cannot apply to next-20180713]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Waiman-Long/fs-dcache-Track-report-number-of-negative-dentries/20180714-161258
config: h8300-h8300h-sim_defconfig (attached as .config)
compiler: h8300-linux-gcc (GCC) 8.1.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=8.1.0 make.cross ARCH=h8300
:::::: branch date: 65 minutes ago
:::::: commit date: 65 minutes ago
All errors (new ones prefixed by >>):
fs/dcache.c: In function 'neg_dentry_inc_slowpath':
>> fs/dcache.c:374:8: error: implicit declaration of function 'get_nr_dentry_neg'; did you mean 'get_nr_dirty_inodes'? [-Werror=implicit-function-declaration]
cnt = get_nr_dentry_neg();
^~~~~~~~~~~~~~~~~
get_nr_dirty_inodes
cc1: some warnings being treated as errors
# https://github.com/0day-ci/linux/commit/ca68ee513a450445b269248c2859302c8931a294
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout ca68ee513a450445b269248c2859302c8931a294
vim +374 fs/dcache.c
bcc9ba8b Waiman Long 2018-07-12 311
2ccdd02c Waiman Long 2018-07-12 312 static noinline int neg_dentry_inc_slowpath(struct dentry *dentry)
bcc9ba8b Waiman Long 2018-07-12 313 {
bcc9ba8b Waiman Long 2018-07-12 314 long cnt = 0, *pcnt;
2aa8bf46 Waiman Long 2018-07-12 315 unsigned long current_time;
bcc9ba8b Waiman Long 2018-07-12 316
bcc9ba8b Waiman Long 2018-07-12 317 /*
bcc9ba8b Waiman Long 2018-07-12 318 * Try to move some negative dentry quota from the global free
bcc9ba8b Waiman Long 2018-07-12 319 * pool to the percpu count to allow more negative dentries to
bcc9ba8b Waiman Long 2018-07-12 320 * be added to the LRU.
bcc9ba8b Waiman Long 2018-07-12 321 */
bcc9ba8b Waiman Long 2018-07-12 322 pcnt = get_cpu_ptr(&nr_dentry_neg);
bcc9ba8b Waiman Long 2018-07-12 323 if ((READ_ONCE(ndblk.nfree) > 0) &&
bcc9ba8b Waiman Long 2018-07-12 324 (*pcnt > neg_dentry_percpu_limit)) {
bcc9ba8b Waiman Long 2018-07-12 325 cnt = __neg_dentry_nfree_dec(*pcnt - neg_dentry_percpu_limit);
bcc9ba8b Waiman Long 2018-07-12 326 *pcnt -= cnt;
bcc9ba8b Waiman Long 2018-07-12 327 }
bcc9ba8b Waiman Long 2018-07-12 328 put_cpu_ptr(&nr_dentry_neg);
bcc9ba8b Waiman Long 2018-07-12 329
2aa8bf46 Waiman Long 2018-07-12 330 if (cnt)
2aa8bf46 Waiman Long 2018-07-12 331 goto out;
2aa8bf46 Waiman Long 2018-07-12 332
bcc9ba8b Waiman Long 2018-07-12 333 /*
2ccdd02c Waiman Long 2018-07-12 334 * Kill the dentry by setting the DCACHE_KILL_NEGATIVE flag and
2ccdd02c Waiman Long 2018-07-12 335 * dec the negative dentry count if the enforcing option is on.
2ccdd02c Waiman Long 2018-07-12 336 */
2ccdd02c Waiman Long 2018-07-12 337 if (neg_dentry_enforce) {
2ccdd02c Waiman Long 2018-07-12 338 dentry->d_flags |= DCACHE_KILL_NEGATIVE;
2ccdd02c Waiman Long 2018-07-12 339 this_cpu_dec(nr_dentry_neg);
2ccdd02c Waiman Long 2018-07-12 340
2ccdd02c Waiman Long 2018-07-12 341 /*
2ccdd02c Waiman Long 2018-07-12 342 * When the dentry is not put into the LRU, we
2ccdd02c Waiman Long 2018-07-12 343 * need to keep the reference count to 1 to
2ccdd02c Waiman Long 2018-07-12 344 * avoid problem when killing it.
2ccdd02c Waiman Long 2018-07-12 345 */
2ccdd02c Waiman Long 2018-07-12 346 WARN_ON_ONCE(dentry->d_lockref.count);
2ccdd02c Waiman Long 2018-07-12 347 dentry->d_lockref.count = 1;
2ccdd02c Waiman Long 2018-07-12 348 return -1; /* Kill the dentry now */
2ccdd02c Waiman Long 2018-07-12 349 }
2ccdd02c Waiman Long 2018-07-12 350
2ccdd02c Waiman Long 2018-07-12 351 /*
2aa8bf46 Waiman Long 2018-07-12 352 * Put out a warning every minute or so if there are just too many
2aa8bf46 Waiman Long 2018-07-12 353 * negative dentries.
bcc9ba8b Waiman Long 2018-07-12 354 */
2aa8bf46 Waiman Long 2018-07-12 355 current_time = jiffies;
bcc9ba8b Waiman Long 2018-07-12 356
2aa8bf46 Waiman Long 2018-07-12 357 if (current_time < ndblk.warn_jiffies + NEG_WARN_PERIOD)
2aa8bf46 Waiman Long 2018-07-12 358 goto out;
2aa8bf46 Waiman Long 2018-07-12 359 /*
2aa8bf46 Waiman Long 2018-07-12 360 * Update the time in ndblk.warn_jiffies and print a warning
2aa8bf46 Waiman Long 2018-07-12 361 * if time update is successful.
2aa8bf46 Waiman Long 2018-07-12 362 */
2aa8bf46 Waiman Long 2018-07-12 363 raw_spin_lock(&ndblk.nfree_lock);
2aa8bf46 Waiman Long 2018-07-12 364 if (current_time < ndblk.warn_jiffies + NEG_WARN_PERIOD) {
2aa8bf46 Waiman Long 2018-07-12 365 raw_spin_unlock(&ndblk.nfree_lock);
2aa8bf46 Waiman Long 2018-07-12 366 goto out;
2aa8bf46 Waiman Long 2018-07-12 367 }
2aa8bf46 Waiman Long 2018-07-12 368 ndblk.warn_jiffies = current_time;
2aa8bf46 Waiman Long 2018-07-12 369 raw_spin_unlock(&ndblk.nfree_lock);
2aa8bf46 Waiman Long 2018-07-12 370
2aa8bf46 Waiman Long 2018-07-12 371 /*
2aa8bf46 Waiman Long 2018-07-12 372 * Get the current negative dentry count & print a warning.
2aa8bf46 Waiman Long 2018-07-12 373 */
2aa8bf46 Waiman Long 2018-07-12 @374 cnt = get_nr_dentry_neg();
2aa8bf46 Waiman Long 2018-07-12 375 pr_warn("Warning: Too many negative dentries (%ld). "
2ccdd02c Waiman Long 2018-07-12 376 "This warning can be disabled by writing 0 to \"fs/neg-dentry-limit\", increasing the limit or writing 1 to \"fs/neg-dentry-enforce\".\n",
2aa8bf46 Waiman Long 2018-07-12 377 cnt);
2aa8bf46 Waiman Long 2018-07-12 378 out:
2ccdd02c Waiman Long 2018-07-12 379 return 0;
bcc9ba8b Waiman Long 2018-07-12 380 }
bcc9ba8b Waiman Long 2018-07-12 381
:::::: The code at line 374 was first introduced by commit
:::::: 2aa8bf4658af0dbc07ae9ea07d04937a347e3ef4 fs/dcache: Print negative dentry warning every min until turned off by user
:::::: TO: Waiman Long <longman@redhat.com>
:::::: CC: 0day robot <lkp@intel.com>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 4383 bytes --]
next prev parent reply other threads:[~2018-07-17 1:15 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-12 16:45 [PATCH v7 0/6] fs/dcache: Track & limit # of negative dentries Waiman Long
2018-07-12 16:45 ` Waiman Long
2018-07-12 16:46 ` [PATCH v7 1/6] fs/dcache: Track & report number " Waiman Long
2018-07-12 16:46 ` Waiman Long
2018-07-12 16:46 ` [PATCH v7 2/6] fs/dcache: Add negative dentries to LRU head initially Waiman Long
2018-07-12 16:46 ` Waiman Long
2018-07-12 16:46 ` [PATCH v7 3/6] fs/dcache: Add sysctl parameter neg-dentry-limit as a soft limit on negative dentries Waiman Long
2018-07-12 16:46 ` Waiman Long
2018-07-12 16:56 ` Matthew Wilcox
2018-07-12 16:56 ` Matthew Wilcox
2018-07-12 17:04 ` Waiman Long
2018-07-12 17:04 ` Waiman Long
2018-07-12 16:46 ` [PATCH v7 4/6] fs/dcache: Print negative dentry warning every min until turned off by user Waiman Long
2018-07-12 16:46 ` Waiman Long
2018-07-17 1:24 ` kbuild test robot
2018-07-17 1:24 ` kbuild test robot
2018-07-12 16:46 ` [PATCH v7 5/6] fs/dcache: Allow optional enforcement of negative dentry limit Waiman Long
2018-07-12 16:46 ` Waiman Long
2018-07-12 16:46 ` [PATCH v7 6/6] fs/dcache: Allow deconfiguration of negative dentry code to reduce kernel size Waiman Long
2018-07-12 16:46 ` Waiman Long
2018-07-17 1:25 ` kbuild test robot [this message]
2018-07-17 1:25 ` kbuild test robot
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=20180717012535.GD10593@intel.com \
--to=lkp@intel.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=akpm@linux-foundation.org \
--cc=corbet@lwn.net \
--cc=jack@suse.cz \
--cc=kbuild-all@01.org \
--cc=keescook@chromium.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=longman@redhat.com \
--cc=lwoodman@redhat.com \
--cc=mcgrof@kernel.org \
--cc=mhocko@kernel.org \
--cc=mingo@kernel.org \
--cc=mszeredi@redhat.com \
--cc=paulmck@linux.vnet.ibm.com \
--cc=torvalds@linux-foundation.org \
--cc=viro@zeniv.linux.org.uk \
--cc=wangkai86@huawei.com \
--cc=willy@infradead.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 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.