All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com>
Subject: [openeuler:OLK-6.6 7535/7622] mm/readahead.c:706 page_cache_sync_ra() warn: bitwise AND condition is false here
Date: Mon, 29 Apr 2024 03:35:29 +0800	[thread overview]
Message-ID: <202404290335.KeORqbmX-lkp@intel.com> (raw)

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
TO: kernel@openeuler.org
TO: ZhaoLong Wang <wangzhaolong1@huawei.com>

tree:   https://gitee.com/openeuler/kernel.git OLK-6.6
head:   f120c2ab14341c60bcc055c700c0a29dce5837ac
commit: 1119ec49ac4ac643e6d7c9a5a834040aef87612e [7535/7622] mm, fs: Add BPF_READAHEAD build option for bpf readhead
:::::: branch date: 7 hours ago
:::::: commit date: 4 days ago
config: x86_64-randconfig-161-20240428 (https://download.01.org/0day-ci/archive/20240429/202404290335.KeORqbmX-lkp@intel.com/config)
compiler: clang version 18.1.4 (https://github.com/llvm/llvm-project e6c3289804a67ea0bb6a86fadbe454dd93b8d855)

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>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202404290335.KeORqbmX-lkp@intel.com/

smatch warnings:
mm/readahead.c:706 page_cache_sync_ra() warn: bitwise AND condition is false here

vim +706 mm/readahead.c

070f866a12fc62 Yufen Yu                2024-01-09  700  
fefa7c478fdafe Matthew Wilcox (Oracle  2020-10-15  701) void page_cache_sync_ra(struct readahead_control *ractl,
fcd9ae4f7f3b5f Matthew Wilcox (Oracle  2021-04-07  702) 		unsigned long req_count)
cf914a7d656e62 Rusty Russell           2007-07-19  703  {
070f866a12fc62 Yufen Yu                2024-01-09  704  	bool do_forced_ra = ractl->file &&
070f866a12fc62 Yufen Yu                2024-01-09  705  			    ((ractl->file->f_mode & FMODE_RANDOM) ||
070f866a12fc62 Yufen Yu                2024-01-09 @706  			     (ractl->file->f_ctl_mode & FMODE_CTL_RANDOM));
cf914a7d656e62 Rusty Russell           2007-07-19  707  
324bcf54c449c7 Jens Axboe              2020-10-17  708  	/*
1e4702806faca1 Matthew Wilcox (Oracle  2022-03-31  709) 	 * Even if readahead is disabled, issue this request as readahead
324bcf54c449c7 Jens Axboe              2020-10-17  710  	 * as we'll need it to satisfy the requested range. The forced
1e4702806faca1 Matthew Wilcox (Oracle  2022-03-31  711) 	 * readahead will do the right thing and limit the read to just the
324bcf54c449c7 Jens Axboe              2020-10-17  712  	 * requested range, which we'll set to 1 page for this case.
324bcf54c449c7 Jens Axboe              2020-10-17  713  	 */
fcd9ae4f7f3b5f Matthew Wilcox (Oracle  2021-04-07  714) 	if (!ractl->ra->ra_pages || blk_cgroup_congested()) {
324bcf54c449c7 Jens Axboe              2020-10-17  715  		if (!ractl->file)
ca47e8c72ae141 Josef Bacik             2018-07-03  716  			return;
324bcf54c449c7 Jens Axboe              2020-10-17  717  		req_count = 1;
324bcf54c449c7 Jens Axboe              2020-10-17  718  		do_forced_ra = true;
324bcf54c449c7 Jens Axboe              2020-10-17  719  	}
ca47e8c72ae141 Josef Bacik             2018-07-03  720  
070f866a12fc62 Yufen Yu                2024-01-09  721  	/* try to read first READAHEAD_FIRST_SIZE into pagecache */
070f866a12fc62 Yufen Yu                2024-01-09  722  	if (ractl->file && (ractl->file->f_ctl_mode & FMODE_CTL_WILLNEED) &&
070f866a12fc62 Yufen Yu                2024-01-09  723  		page_cache_readahead_from_head(ractl->mapping, ractl->file,
070f866a12fc62 Yufen Yu                2024-01-09  724  			readahead_index(ractl), req_count, READAHEAD_FIRST_SIZE))
070f866a12fc62 Yufen Yu                2024-01-09  725  		return;
070f866a12fc62 Yufen Yu                2024-01-09  726  
0141450f66c3c1 Wu Fengguang            2010-03-05  727  	/* be dumb */
324bcf54c449c7 Jens Axboe              2020-10-17  728  	if (do_forced_ra) {
fcd9ae4f7f3b5f Matthew Wilcox (Oracle  2021-04-07  729) 		force_page_cache_ra(ractl, req_count);
0141450f66c3c1 Wu Fengguang            2010-03-05  730  		return;
0141450f66c3c1 Wu Fengguang            2010-03-05  731  	}
0141450f66c3c1 Wu Fengguang            2010-03-05  732  
793917d997df2e Matthew Wilcox (Oracle  2020-02-05  733) 	ondemand_readahead(ractl, NULL, req_count);
cf914a7d656e62 Rusty Russell           2007-07-19  734  }
fefa7c478fdafe Matthew Wilcox (Oracle  2020-10-15  735) EXPORT_SYMBOL_GPL(page_cache_sync_ra);
cf914a7d656e62 Rusty Russell           2007-07-19  736  

:::::: The code at line 706 was first introduced by commit
:::::: 070f866a12fc623f5f365ccdc7239c82a99fc717 readahead: introduce FMODE_CTL_WILLNEED to read first 2MB of file

:::::: TO: Yufen Yu <yuyufen@huawei.com>
:::::: CC: ZhaoLong Wang <wangzhaolong1@huawei.com>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

                 reply	other threads:[~2024-04-28 19:35 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202404290335.KeORqbmX-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=error27@gmail.com \
    --cc=oe-kbuild@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.