From nobody Sat Apr 27 13:35:24 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=quarantine dis=none) header.from=suse.com ARC-Seal: i=1; a=rsa-sha256; t=1632132253; cv=none; d=zohomail.com; s=zohoarc; b=QI/k+shfutgtaBcD6rU+cyQpNckAAjCVQeohINwvZMyyyQjhFMni58DlI6BOgOd/cP80DefrQESKSx9iMK3Cr2g6l4NsJiq/XOOeG14Uvo2gsfojpuO237dcUPb6G2dNO+k81GCz0/zixYOgJNEHzdDghZXrGBCx7ulk2qAe3kA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1632132253; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=ivJziB2O5eFrbTydHKD9ChXEfjN0ENtyaE/rDNMKk0Q=; b=Yl1ylkEeyXOjNM+hZt819KtZs4fTlL8bPqfAfjSgie61qav1VzADzMAGfF6xs9hArAl3JtbO2S4FwwzedWyDbukoixPOPt1jxw2fZfZYYFDr0Etk6hG+ZPxZul3bgnzD4n1ZIPt2+cWtxWvC4ygCXHxMO/ZxbF9Ot2Ld+8j5QzQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 163213225384627.87575333692064; Mon, 20 Sep 2021 03:04:13 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.190531.340333 (Exim 4.92) (envelope-from ) id 1mSG9N-000506-EK; Mon, 20 Sep 2021 10:03:49 +0000 Received: by outflank-mailman (output) from mailman id 190531.340333; Mon, 20 Sep 2021 10:03:49 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mSG9N-0004zz-Ax; Mon, 20 Sep 2021 10:03:49 +0000 Received: by outflank-mailman (input) for mailman id 190531; Mon, 20 Sep 2021 10:03:48 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mSG9M-0004zt-Cd for xen-devel@lists.xenproject.org; Mon, 20 Sep 2021 10:03:48 +0000 Received: from smtp-out2.suse.de (unknown [195.135.220.29]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 0b9a13ae-19fa-11ec-b869-12813bfff9fa; Mon, 20 Sep 2021 10:03:47 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id A0AF72004C; Mon, 20 Sep 2021 10:03:46 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 76661139F0; Mon, 20 Sep 2021 10:03:46 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id QViJG4JcSGFrVgAAMHmgww (envelope-from ); Mon, 20 Sep 2021 10:03:46 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 0b9a13ae-19fa-11ec-b869-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1632132226; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=ivJziB2O5eFrbTydHKD9ChXEfjN0ENtyaE/rDNMKk0Q=; b=cZgMUi8gadqqqojok7RDjUHPHmU55H/Sv/j8a8W/FgBoU9GGROExHxlTI3pGQIV16Y8bAZ LMRAfIvGkJfhKjd8jFSogY2ylM0LvNLvjC9rWM7JgAJQp1ChOuN4H4PnIVsNncShIP782F 3W9Ec46o2+0FgAgHYg1BRZkiNlZAuCE= From: Juergen Gross To: xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org Cc: Juergen Gross , Boris Ostrovsky , Stefano Stabellini Subject: [PATCH] xen/balloon: fix balloon kthread freezing Date: Mon, 20 Sep 2021 12:03:45 +0200 Message-Id: <20210920100345.21939-1-jgross@suse.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @suse.com) X-ZM-MESSAGEID: 1632132254445100001 Content-Type: text/plain; charset="utf-8" Commit 8480ed9c2bbd56 ("xen/balloon: use a kernel thread instead a workqueue") switched the Xen balloon driver to use a kernel thread. Unfortunately the patch omitted to call try_to_freeze() or to use wait_event_freezable_timeout(), causing a system suspend to fail. Fixes: 8480ed9c2bbd56 ("xen/balloon: use a kernel thread instead a workqueu= e") Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky --- drivers/xen/balloon.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/xen/balloon.c b/drivers/xen/balloon.c index 2d2803883306..43ebfe36ac27 100644 --- a/drivers/xen/balloon.c +++ b/drivers/xen/balloon.c @@ -522,8 +522,8 @@ static int balloon_thread(void *unused) timeout =3D 3600 * HZ; credit =3D current_credit(); =20 - wait_event_interruptible_timeout(balloon_thread_wq, - balloon_thread_cond(state, credit), timeout); + wait_event_freezable_timeout(balloon_thread_wq, + balloon_thread_cond(state, credit), timeout); =20 if (kthread_should_stop()) return 0; --=20 2.26.2