From patchwork Mon Feb 1 22:12:38 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Valente X-Patchwork-Id: 8184501 Return-Path: X-Original-To: patchwork-linux-block@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id AB821BEEE5 for ; Mon, 1 Feb 2016 22:50:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D0AF920397 for ; Mon, 1 Feb 2016 22:50:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EB705200F2 for ; Mon, 1 Feb 2016 22:50:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753799AbcBAWuX (ORCPT ); Mon, 1 Feb 2016 17:50:23 -0500 Received: from spostino.sms.unimo.it ([155.185.44.3]:56053 "EHLO spostino.sms.unimo.it" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754116AbcBAWuT (ORCPT ); Mon, 1 Feb 2016 17:50:19 -0500 Received: from [185.14.10.195] (port=35339 helo=localhost.localdomain) by spostino.sms.unimo.it with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA256:128) (Exim 4.80) (envelope-from ) id 1aQMjA-0004Vs-T0; Mon, 01 Feb 2016 23:13:45 +0100 From: Paolo Valente To: Jens Axboe , Tejun Heo 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, Paolo Valente Subject: [PATCH RFC 02/22] block, cfq: remove close-based preemption Date: Mon, 1 Feb 2016 23:12:38 +0100 Message-Id: <1454364778-25179-3-git-send-email-paolo.valente@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1454364778-25179-1-git-send-email-paolo.valente@linaro.org> References: <1454364778-25179-1-git-send-email-paolo.valente@linaro.org> UNIMORE-X-SA-Score: -2.9 Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Arianna Avanzini CFQ may preempt the queue currently in service if a new request, for a different queue, happens to be close to the last-dispatched request. This boosts the throughput with processes that issue close requests, but whose I/O patterns are not regularly interleaved enough to trigger the activation of the queue-merging heuristic removed in the previous commit. BFQ does not need to perform any such preemption, because the queue-merging mechanism of BFQ (EQM) is reactive enough to merge queues also in the presence of irregularly interleaved I/O. Signed-off-by: Arianna Avanzini Signed-off-by: Paolo Valente --- block/cfq-iosched.c | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c index 72def9c..3084f99 100644 --- a/block/cfq-iosched.c +++ b/block/cfq-iosched.c @@ -2665,12 +2665,6 @@ static inline sector_t cfq_dist_from_last(struct cfq_data *cfqd, return cfqd->last_position - blk_rq_pos(rq); } -static inline int cfq_rq_close(struct cfq_data *cfqd, struct cfq_queue *cfqq, - struct request *rq) -{ - return cfq_dist_from_last(cfqd, rq) <= CFQQ_CLOSE_THR; -} - /* * Determine whether we should enforce idle window for this queue. */ @@ -3701,13 +3695,6 @@ cfq_should_preempt(struct cfq_data *cfqd, struct cfq_queue *new_cfqq, if (!cfqd->active_cic || !cfq_cfqq_wait_request(cfqq)) return false; - /* - * if this request is as-good as one we would expect from the - * current cfqq, let it preempt - */ - if (cfq_rq_close(cfqd, cfqq, rq)) - return true; - return false; }