From patchwork Tue Jan 29 11:06:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Valente X-Patchwork-Id: 156967 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp4523294jaa; Tue, 29 Jan 2019 03:07:52 -0800 (PST) X-Google-Smtp-Source: ALg8bN63jLiomdBV0sQcDgHx6WCNTH2lH7Y8yvZh8faBs8uoKYcL24QpLSIpCSd6ye2lA//BtoAD X-Received: by 2002:a62:6385:: with SMTP id x127mr26035869pfb.15.1548760071891; Tue, 29 Jan 2019 03:07:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548760071; cv=none; d=google.com; s=arc-20160816; b=bYXFOC7DKvIl2WOIjky/jn0o+Bp3RmxMEgT0WDSpWB1Z1+Iz9MfztRbxi/qp6eF59f jCDHM7Y1stWD87uqbLO2uaIys5g/Y1CmK6l+00c9BqBff1SS5sT9phgvdCkZp1LWnTUw u2WEFaGF3OevzEXck8K1UDt2TU9fKsm8Vpjihf4oSxl/8nlatGO8BxdEjFUASrbWDI4k yhOm/AXsj9DuumAY3DsRwFF7gYXciVvUrYuNKteo9ztKtpX8QBFlvDrD9HaE6IZLw6cs 6e39nll6B5QJgXM+ofavmg7rUBYpM6dAOqTM1DT055rpSCCiixPnmSpi0BXDc25t/fUk Adlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=NergthX5oSNRCeJESFYVsMGHKG3cwu/m8eBx+7n5JOE=; b=j9HPqQ6hXJIM3hWEtXZKBDfkxkl4Njbpbjev3N3uLOefxlPsSNHqvvxjj+zwSLE1pf 2qvejNoHVL0/4WBwZ8TLH0Ay2OMTODL2rL78FIRv6m0JORStYlYEcvpXwN0UoHwKJ/Pm uPp6e+uF4yz5mXWB8WV98EVJOsuAR5hlPziqBdr1BktRV/H67qd1+UpvK4g9AVoSrco6 pqBxG2Qp+z5Yki+668an1hHyvOWWON5lYHfItM7CKNQJnsAvsGSu2lhJvSWDoeHrKFIK ajS2MlcRo08OlOeTn8GOLt4tjgi5Opuh9NR5I5ogROm9HmbtDtqYhSI508RpxDSsQFN4 3yOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=djoXGnsK; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 87si34902407pfs.7.2019.01.29.03.07.51; Tue, 29 Jan 2019 03:07:51 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=djoXGnsK; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728510AbfA2LHJ (ORCPT + 31 others); Tue, 29 Jan 2019 06:07:09 -0500 Received: from mail-wr1-f66.google.com ([209.85.221.66]:35731 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727193AbfA2LHD (ORCPT ); Tue, 29 Jan 2019 06:07:03 -0500 Received: by mail-wr1-f66.google.com with SMTP id 96so21587909wrb.2 for ; Tue, 29 Jan 2019 03:07:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=NergthX5oSNRCeJESFYVsMGHKG3cwu/m8eBx+7n5JOE=; b=djoXGnsK11deAS6J4IpmOiUJzQK9Kh7UxFQ1sIfWXNRnsCRYdWvW0iAmNOyyvH1U5l ORyYOSUQzOHLOCqOg8RLHcMw3X44QxZocHBXJf/enpRVP2QWwBZEQTd1ADwMLsAu7YOh D74Y4PF0RgKe7o69H7P4Au761wDwXZIkzxtm4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=NergthX5oSNRCeJESFYVsMGHKG3cwu/m8eBx+7n5JOE=; b=jU4PZSREA/iWQiFUfzVHXMtG1wPRUX2xXoLQuhBHhRzK5T09W0fdEe7NOySthAvUYf A8ykWXQDsHA8pLVr1VjCXVLzs3mOobUB4lSh5i7ifh0QKhyOrNEHKsvKHvtCuH3Fq7gu OKZm60oYNXx3TtYlVy1pBUSImgoPOEtQGyojdyOitqm3h4AQY48xf0dnW4D8Vsd0ezRl jQTZcn5/IWljDSEvJmFeXqKXN449GRatZCtH+wPPoe4cXmDCI64rRVxdC687wCjgrvxa hH5/CC00wKZn4tnF5/FiktiG5WL+hJHaIa/brQz4BPYf3DRgpBVJh5wq21WSeOM9/udv 0EeQ== X-Gm-Message-State: AJcUuketau9O8h7xOe+Pg1BvyHL6FjHsDi+agvWvWJupo0/5GPJzTCGR rU4wWbMFMcNK8M0yosv96VW21Q== X-Received: by 2002:adf:9361:: with SMTP id 88mr24827980wro.204.1548760022218; Tue, 29 Jan 2019 03:07:02 -0800 (PST) Received: from localhost.localdomain ([88.147.67.218]) by smtp.gmail.com with ESMTPSA id s132sm2066112wmf.28.2019.01.29.03.07.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 29 Jan 2019 03:07:01 -0800 (PST) From: Paolo Valente To: Jens Axboe Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, ulf.hansson@linaro.org, linus.walleij@linaro.org, broonie@kernel.org, bfq-iosched@googlegroups.com, oleksandr@natalenko.name, mancha@tower-research.com, Paolo Valente Subject: [PATCH BUGFIX IMPROVEMENT 04/14] block, bfq: remove case of redirected bic from insert_request Date: Tue, 29 Jan 2019 12:06:28 +0100 Message-Id: <20190129110638.12652-5-paolo.valente@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190129110638.12652-1-paolo.valente@linaro.org> References: <20190129110638.12652-1-paolo.valente@linaro.org> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Before commit 18e5a57d7987 ("block, bfq: postpone rq preparation to insert or merge"), the destination queue for a request was chosen by a different hook than the one that then inserted the request. So, between the execution of the two hooks, the bic of the process generating the request could happen to be redirected to a different bfq_queue. As a consequence, the destination bfq_queue stored in the request could be wrong. Such an event does not need to ba handled any longer. Signed-off-by: Paolo Valente --- block/bfq-iosched.c | 2 -- 1 file changed, 2 deletions(-) -- 2.20.1 diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c index b0e8006475be..a9275ed57726 100644 --- a/block/bfq-iosched.c +++ b/block/bfq-iosched.c @@ -4633,8 +4633,6 @@ static bool __bfq_insert_request(struct bfq_data *bfqd, struct request *rq) bool waiting, idle_timer_disabled = false; if (new_bfqq) { - if (bic_to_bfqq(RQ_BIC(rq), 1) != bfqq) - new_bfqq = bic_to_bfqq(RQ_BIC(rq), 1); /* * Release the request's reference to the old bfqq * and make sure one is taken to the shared queue.