From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751229AbcIIAuF (ORCPT ); Thu, 8 Sep 2016 20:50:05 -0400 Received: from mga14.intel.com ([192.55.52.115]:2840 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750761AbcIIAuE (ORCPT ); Thu, 8 Sep 2016 20:50:04 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.30,303,1470726000"; d="scan'208";a="876663095" Date: Fri, 9 Sep 2016 08:46:40 +0800 From: Ye Xiaolong To: Jens Axboe Cc: Tejun Heo , Fengguang Wu , lkp@01.org, Philip Li , LKML Subject: Re: [LKP] [writeback] 8bc4ad9498: INFO: suspicious RCU usage. ] Message-ID: <20160909004640.GA7334@yexl-desktop> References: <57c8012a.zlFYe5dba5wTaKD+%xiaolong.ye@intel.com> <20160907164103.GA1375@htj.duckdns.org> <6046dded-a2a6-b6e2-8c2c-0cf13accf1e9@fb.com> <20160908014313.fdebw6ig2m6edy46@wfg-t540p.sh.intel.com> <20160908020404.GA12960@yexl-desktop> <4cace953-b5b9-4840-f3f2-b21bd4f30095@fb.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4cace953-b5b9-4840-f3f2-b21bd4f30095@fb.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/08, Jens Axboe wrote: >On 09/07/2016 08:04 PM, Ye Xiaolong wrote: >>On 09/08, Fengguang Wu wrote: >>>Hi Jens and Tejun, >>> >>>>The command line was in the original email: >>>> >>>>$ qemu-system-x86_64 -enable-kvm -cpu Westmere -m 512M >>>> >>>>And agree, in general it'd be nice if there was a link to the image as >>>>well, so that folks can reproduce. >>> >>>Yes we have a reproduce script internally, however need to polish it >>>up and make it general usable by kernel developers. >>> >>>CC Philip. It'd be helpful to give more priority to the "lkp qemu" >>>reproduce command. >>> >>>For the warning here, it does not depend on any initrd, I just >>>confirmed this simple script can reproduce the problem. >> >>Yes, just confirmed that v4.8-rc5 doesn't have this warning, while kernel >>for the updated commit (fa0e2cb1af765691fabd329f03cad563a0eebf18) on branch >>wb-buf-throttle could reproduce it. > >Anyone willing to try the below patch? The warning log is gone with this patch. Tested-by: Xiaolong Ye Thanks, Xiaolong > >diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c >index ef61bda76317..a7bb2e6bcaef 100644 >--- a/block/cfq-iosched.c >+++ b/block/cfq-iosched.c >@@ -3764,9 +3764,11 @@ static void check_blkcg_changed(struct >cfq_io_cq *cic, struct bio *bio) > struct cfq_data *cfqd = cic_to_cfqd(cic); > struct cfq_queue *cfqq; > uint64_t serial_nr; >+ bool nonroot_cg; > > rcu_read_lock(); > serial_nr = bio_blkcg(bio)->css.serial_nr; >+ nonroot_cg = bio_blkcg(bio) != &blkcg_root; > rcu_read_unlock(); > > /* >@@ -3781,7 +3783,7 @@ static void check_blkcg_changed(struct >cfq_io_cq *cic, struct bio *bio) > * do proper throttling of writes. Turn off wbt for that > * case. > */ >- if (bio_blkcg(bio) != &blkcg_root) { >+ if (nonroot_cg) { > struct request_queue *q = cfqd->queue; > > if (q->rq_wb) > >-- >Jens Axboe >