Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753469AbdCOQ4c (ORCPT ); Wed, 15 Mar 2017 12:56:32 -0400 Received: from mail-qk0-f171.google.com ([209.85.220.171]:35077 "EHLO mail-qk0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753415AbdCOQ4a (ORCPT ); Wed, 15 Mar 2017 12:56:30 -0400 Subject: Re: [PATCH RFC 10/14] block, bfq: add Early Queue Merge (EQM) To: Paolo Valente , Tejun Heo References: <20170304160131.57366-1-paolo.valente@linaro.org> <20170304160131.57366-11-paolo.valente@linaro.org> Cc: Fabio Checconi , Arianna Avanzini , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, ulf.hansson@linaro.org, linus.walleij@linaro.org, broonie@kernel.org, Mauro Andreolini From: Jens Axboe Message-ID: <64ef5694-d62d-e14c-ce80-a213c406bf22@kernel.dk> Date: Wed, 15 Mar 2017 10:56:25 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <20170304160131.57366-11-paolo.valente@linaro.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 651 Lines: 20 On 03/04/2017 09:01 AM, Paolo Valente wrote: > @@ -6330,7 +7012,41 @@ static void bfq_rq_enqueued(struct bfq_data *bfqd, struct bfq_queue *bfqq, > > static void __bfq_insert_request(struct bfq_data *bfqd, struct request *rq) > { > - struct bfq_queue *bfqq = RQ_BFQQ(rq); > + struct bfq_queue *bfqq = RQ_BFQQ(rq), *new_bfqq; > + > + /* > + * An unplug may trigger a requeue of a request from the device > + * driver: make sure we are in process context while trying to > + * merge two bfq_queues. > + */ > + if (!in_interrupt()) { What's the reason for this? Don't use in_interrupt() to guide any of your decision making here. -- Jens Axboe