Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751897AbbEASG1 (ORCPT ); Fri, 1 May 2015 14:06:27 -0400 Received: from mx0a-00082601.pphosted.com ([67.231.145.42]:26246 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751023AbbEASGX (ORCPT ); Fri, 1 May 2015 14:06:23 -0400 Date: Fri, 1 May 2015 11:05:52 -0700 From: Shaohua Li To: Christoph Hellwig CC: , , , Subject: Re: [PATCH 2/5] sched: always use blk_schedule_flush_plug in io_schedule_out Message-ID: <20150501180551.GA1985179@devbig257.prn2.facebook.com> References: <9eedafbfb33bf3e8d273860e75f9f07ca9b0d5ec.1430414610.git.shli@fb.com> <20150501171410.GB16920@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20150501171410.GB16920@lst.de> User-Agent: Mutt/1.5.20 (2009-12-10) X-Originating-IP: [192.168.52.13] X-Proofpoint-Spam-Reason: safe X-FB-Internal: Safe X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.13.68,1.0.33,0.0.0000 definitions=2015-05-01_07:2015-05-01,2015-05-01,1970-01-01 signatures=0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1348 Lines: 38 On Fri, May 01, 2015 at 07:14:10PM +0200, Christoph Hellwig wrote: > On Thu, Apr 30, 2015 at 10:45:15AM -0700, Shaohua Li wrote: > > long __sched io_schedule_timeout(long timeout) > > { > > - int old_iowait = current->in_iowait; > > struct rq *rq; > > long ret; > > > > current->in_iowait = 1; > > - if (old_iowait) > > - blk_schedule_flush_plug(current); > > - else > > - blk_flush_plug(current); > > + blk_schedule_flush_plug(current); > > > > delayacct_blkio_start(); > > rq = raw_rq(); > > atomic_inc(&rq->nr_iowait); > > ret = schedule_timeout(timeout); > > - current->in_iowait = old_iowait; > > + current->in_iowait = 0; > > Always clearing ->in_iowait is behavior change not mentioned in the > changelog. Even if it was intentional it would better be done in > a separate patch. 9cff8adeaa34b5d28 changes to use blk_schedule_flush_plug for recursive io_schedule with old_iowait for recurse detection. Since we always use blk_schedule_flush_plug now, I thought we don't need the recurse detection any more. I agree it's better to do it in another patch. Thanks, Shaohua -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/