public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Bart Van Assche <bvanassche@acm.org>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: Re: [PATCH 11/12] block: mq-deadline: Fix a race condition related to zoned writes
Date: Sat, 8 Apr 2023 01:08:23 +0800	[thread overview]
Message-ID: <202304080013.UtHGCZkg-lkp@intel.com> (raw)
In-Reply-To: <20230407001710.104169-12-bvanassche@acm.org>

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

           reply	other threads:[~2023-04-07 17:09 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <20230407001710.104169-12-bvanassche@acm.org>]

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=202304080013.UtHGCZkg-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=bvanassche@acm.org \
    --cc=llvm@lists.linux.dev \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox