mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Waiman Long <longman@redhat.com>
To: kernel test robot <lkp@intel.com>, Ingo Molnar <mingo@redhat.com>,
	Will Deacon <will@kernel.org>, Boqun Feng <boqun.feng@gmail.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
	john.p.donnelly@oracle.com, "Hillf Danton" <hdanton@sina.com>,
	"Mukesh Ojha" <quic_mojha@quicinc.com>,
	"Ting11 Wang 王婷" <wangting11@xiaomi.com>
Subject: Re: [PATCH v5 3/6] locking/rwsem: Disable preemption at all down_write*() and up_write() code paths
Date: Thu, 3 Nov 2022 20:00:53 -0400	[thread overview]
Message-ID: <c1dce443-3f15-1677-a563-5e26469f93c0@redhat.com> (raw)
In-Reply-To: <202211040317.y9sxkmoi-lkp@intel.com>


On 11/3/22 16:04, kernel test robot wrote:
> Hi Waiman,
>
> I love your patch! Perhaps something to improve:
>
> [auto build test WARNING on tip/locking/core]
> [also build test WARNING on tip/master linus/master v6.1-rc3 next-20221103]
> [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/Waiman-Long/lockinig-rwsem-Fix-rwsem-bugs-enable-true-lock-handoff/20221104-023520
> patch link:    https://lore.kernel.org/r/20221103182936.217120-4-longman%40redhat.com
> patch subject: [PATCH v5 3/6] locking/rwsem: Disable preemption at all down_write*() and up_write() code paths
> config: m68k-allyesconfig
> compiler: m68k-linux-gcc (GCC) 12.1.0
> 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/b83e7cdb918b02166fbe3954940a7bd6f04eef14
>          git remote add linux-review https://github.com/intel-lab-lkp/linux
>          git fetch --no-tags linux-review Waiman-Long/lockinig-rwsem-Fix-rwsem-bugs-enable-true-lock-handoff/20221104-023520
>          git checkout b83e7cdb918b02166fbe3954940a7bd6f04eef14
>          # save the config file
>          mkdir build_dir && cp config build_dir/.config
>          COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=m68k SHELL=/bin/bash kernel/locking/
>
> If you fix the issue, kindly add following tag where applicable
> | Reported-by: kernel test robot <lkp@intel.com>
>
> All warnings (new ones prefixed by >>):
>
>     kernel/locking/rwsem.c: In function '__down_write_common':
>>> kernel/locking/rwsem.c:1302:13: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
>      1302 |         int ret = 0;
>           |             ^~~

Oh well, I will fix that.

Cheers,
Longman

>
> vim +/ret +1302 kernel/locking/rwsem.c
>
>    1296	
>    1297	/*
>    1298	 * lock for writing
>    1299	 */
>    1300	static inline int __down_write_common(struct rw_semaphore *sem, int state)
>    1301	{
>> 1302		int ret = 0;
>    1303	
>    1304		preempt_disable();
>    1305		if (unlikely(!rwsem_write_trylock(sem))) {
>    1306			if (IS_ERR(rwsem_down_write_slowpath(sem, state)))
>    1307				ret = -EINTR;
>    1308		}
>    1309		preempt_enable();
>    1310	
>    1311		return 0;
>    1312	}
>    1313	
>


  reply	other threads:[~2022-11-04  0:02 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-03 18:29 [PATCH v5 0/6] lockinig/rwsem: Fix rwsem bugs & enable true lock handoff Waiman Long
2022-11-03 18:29 ` [PATCH v5 1/6] locking/rwsem: Prevent non-first waiter from spinning in down_write() slowpath Waiman Long
2022-11-03 18:29 ` [PATCH v5 2/6] locking/rwsem: Disable preemption at all down_read*() and up_read() code paths Waiman Long
2022-11-03 18:29 ` [PATCH v5 3/6] locking/rwsem: Disable preemption at all down_write*() and up_write() " Waiman Long
2022-11-03 20:04   ` kernel test robot
2022-11-04  0:00     ` Waiman Long [this message]
2022-11-03 18:29 ` [PATCH v5 4/6] locking/rwsem: Change waiter->hanodff_set to a handoff_state enum Waiman Long
2022-11-03 18:29 ` [PATCH v5 5/6] locking/rwsem: Enable direct rwsem lock handoff Waiman Long
2022-11-03 18:29 ` [PATCH v5 6/6] locking/rwsem: Update handoff lock events tracking Waiman Long

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=c1dce443-3f15-1677-a563-5e26469f93c0@redhat.com \
    --to=longman@redhat.com \
    --cc=boqun.feng@gmail.com \
    --cc=hdanton@sina.com \
    --cc=john.p.donnelly@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=mingo@redhat.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=quic_mojha@quicinc.com \
    --cc=wangting11@xiaomi.com \
    --cc=will@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®