public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
* Re: [PATCH 11/12] block: mq-deadline: Fix a race condition related to zoned writes
       [not found] <20230407001710.104169-12-bvanassche@acm.org>
@ 2023-04-07 17:08 ` kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-04-07 17:08 UTC (permalink / raw)
  To: Bart Van Assche; +Cc: llvm, oe-kbuild-all

Hi Bart,

kernel test robot noticed the following build errors:

[auto build test ERROR on axboe-block/for-next]
[also build test ERROR on linus/master v6.3-rc5 next-20230406]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Bart-Van-Assche/block-Send-zoned-writes-to-the-I-O-scheduler/20230407-081846
base:   https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git for-next
patch link:    https://lore.kernel.org/r/20230407001710.104169-12-bvanassche%40acm.org
patch subject: [PATCH 11/12] block: mq-deadline: Fix a race condition related to zoned writes
config: i386-randconfig-r031-20230403 (https://download.01.org/0day-ci/archive/20230408/202304080013.UtHGCZkg-lkp@intel.com/config)
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
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/intel-lab-lkp/linux/commit/10abd923538d71bd2d53f8d8ec2f7bbfe746e6cb
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Bart-Van-Assche/block-Send-zoned-writes-to-the-I-O-scheduler/20230407-081846
        git checkout 10abd923538d71bd2d53f8d8ec2f7bbfe746e6cb
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202304080013.UtHGCZkg-lkp@intel.com/

All errors (new ones prefixed by >>):

>> block/mq-deadline.c:392:22: error: implicit declaration of function 'blk_rq_zone_no' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
                   unsigned int zno = blk_rq_zone_no(rq);
                                      ^
   1 error generated.


vim +/blk_rq_zone_no +392 block/mq-deadline.c

   362	
   363	/*
   364	 * For the specified data direction, return the next request to
   365	 * dispatch using sector position sorted lists.
   366	 */
   367	static struct request *
   368	deadline_next_request(struct deadline_data *dd, struct dd_per_prio *per_prio,
   369			      enum dd_data_dir data_dir)
   370	{
   371		struct request_queue *q;
   372		struct request *rq;
   373		unsigned long flags;
   374	
   375		rq = per_prio->next_rq[data_dir];
   376		if (!rq)
   377			return NULL;
   378	
   379		q = rq->q;
   380		if (data_dir == DD_READ || !blk_queue_is_zoned(q))
   381			return rq;
   382	
   383		/*
   384		 * Look for a write request that can be dispatched, that is one with
   385		 * an unlocked target zone. For some HDDs, breaking a sequential
   386		 * write stream can lead to lower throughput, so make sure to preserve
   387		 * sequential write streams, even if that stream crosses into the next
   388		 * zones and these zones are unlocked.
   389		 */
   390		spin_lock_irqsave(&dd->zone_lock, flags);
   391		while (rq) {
 > 392			unsigned int zno = blk_rq_zone_no(rq);
   393	
   394			if (blk_req_can_dispatch_to_zone(rq))
   395				break;
   396	
   397			WARN_ON_ONCE(!blk_queue_is_zoned(q));
   398	
   399			if (!blk_queue_nonrot(q)) {
   400				rq = deadline_skip_seq_writes(dd, rq);
   401				if (!rq)
   402					break;
   403				rq = deadline_earlier_request(rq);
   404				if (WARN_ON_ONCE(!rq))
   405					break;
   406			}
   407	
   408			/*
   409			 * Skip all other write requests for the zone with zone number
   410			 * 'zno'. This prevents that this function selects a zoned write
   411			 * that is not the first write for a given zone.
   412			 */
   413			while ((rq = deadline_latter_request(rq)) &&
   414			       blk_rq_zone_no(rq) == zno)
   415				;
   416		}
   417		spin_unlock_irqrestore(&dd->zone_lock, flags);
   418	
   419		return rq;
   420	}
   421	

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-04-07 17:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20230407001710.104169-12-bvanassche@acm.org>
2023-04-07 17:08 ` [PATCH 11/12] block: mq-deadline: Fix a race condition related to zoned writes kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox