Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1065213ybl; Wed, 14 Aug 2019 10:08:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqytEeI5amNo1tthcQvLIvzuNtAciKUoMJlL3mje9qXhacscsB0/SLd44YvG/GM3ZAoBVrlk X-Received: by 2002:aa7:85cd:: with SMTP id z13mr1004859pfn.214.1565802529513; Wed, 14 Aug 2019 10:08:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565802529; cv=none; d=google.com; s=arc-20160816; b=v2vAIqAfTq+VqN8RX6nYF7HDejK5EadmLA6NgfqlCEIcoUdFNZeYjJfNYBxUP14aZH ZfeXXPHWoonj6SSielotsRejLQpYtzANTUPrLxpTfNyT8OfCWODDFAMU6ZSlMQCtNFcQ Bxnc+mOPdN7N0Zqm4FkplkkSviL+WZinC3TcdF98APabjrAHtz4cqX+3dqQYHKsZr1Lb aM8Woig7H+SLIVI7bbecxwQ9+VSgKBaCVl7StCBjCzbKGHaX6xn8/Y0TGtBjNTLdhAGd +JQIUbey5oNKWrVbezErGVL6CDIW2fq2oFkYMduLRfdsRUSlo+lQ+ZbLlF6aTcqKiRhs VR+A== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=HIMw4QUwbFxaB5WVGYUBrWwN5tNBlsPUkTn/46Vb6ew=; b=p8MUHYIV+SMpzXEVDN+LWPiX4JN8UHHaEiSVplEQ/X8LIAGYA+15PPAjJiOotP4Z9d WNd3RLZeX+dmK1aNLbVzhWNv/mZXHLC6WYM4J8wzXmDt7uvo+iFYLE29ejidOFUHbu0V eJ7wQ/zxDhlZmYFuKZhrFy4e2S6oPDNhklsRla8TC0Cm+G1rOl3WeK9ZXw6jgTJWZdGf uI503FRcnDUp0RpO5mkzRruK87yn4f9LnOgxyFjcaWCNt3TsuK47hRQlWyeYfEZAtSyx krXsgCbRFfarERb6pUdr0wHEqNdR3HANI7179rHWddP2F3GrKdauQT+hrYvChI0tSsB/ V6Mg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=eulxkqj3; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j64si135051pge.556.2019.08.14.10.08.33; Wed, 14 Aug 2019 10:08:49 -0700 (PDT) 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=@kernel.org header.s=default header.b=eulxkqj3; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729510AbfHNRFs (ORCPT + 99 others); Wed, 14 Aug 2019 13:05:48 -0400 Received: from mail.kernel.org ([198.145.29.99]:54682 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728457AbfHNRFn (ORCPT ); Wed, 14 Aug 2019 13:05:43 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 66CA02084D; Wed, 14 Aug 2019 17:05:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1565802342; bh=XiPjNHNVCK3KucFiNxonNoU7G7EJoy3Q8sILBxEOtk8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eulxkqj3/80L3gpZi5eVcfY9b2SIx2kItOadxG02EkfFSwWB2rkAQT+ifotHyQFtS L7unKodRFok9TXXchVyHLemfmqX1Ihl1F8e8jTnGPURQEzQsXOH0zaj1kLGu57yjsI wwcSJIv6aVMZ4GWdFBr203ySlTLYM49mLrVeGPII= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Oleg Nesterov , Josef Bacik , Jens Axboe , Sasha Levin Subject: [PATCH 5.2 061/144] rq-qos: set ourself TASK_UNINTERRUPTIBLE after we schedule Date: Wed, 14 Aug 2019 19:00:17 +0200 Message-Id: <20190814165802.384808920@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190814165759.466811854@linuxfoundation.org> References: <20190814165759.466811854@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit d14a9b389a86a5154b704bc88ce8dd37c701456a ] In case we get a spurious wakeup we need to make sure to re-set ourselves to TASK_UNINTERRUPTIBLE so we don't busy wait. Reviewed-by: Oleg Nesterov Signed-off-by: Josef Bacik Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin --- block/blk-rq-qos.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block/blk-rq-qos.c b/block/blk-rq-qos.c index e5d75280b431e..e3ab75e4df9ea 100644 --- a/block/blk-rq-qos.c +++ b/block/blk-rq-qos.c @@ -261,6 +261,7 @@ void rq_qos_wait(struct rq_wait *rqw, void *private_data, } io_schedule(); has_sleeper = true; + set_current_state(TASK_UNINTERRUPTIBLE); } while (1); finish_wait(&rqw->wait, &data.wq); } -- 2.20.1