Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp567459lqd; Wed, 24 Apr 2024 10:12:51 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVXjHrG44zHXa2n9LTkf5096OxzFI9wFf1QEKq+/SW0/akQQ0JJxCuvhRo+xYbWBLxOrUKtqlfYH5ytKSueWYUj0MMpV7J/tf7KuPXShQ== X-Google-Smtp-Source: AGHT+IE71c6cxZC8HyywTPH+dW7eeUkUUaxJ5MdXc174NzzN5pdzFYMqqxVfTXzqfdVH4MvBOO92 X-Received: by 2002:a05:6e02:1a4a:b0:36a:3848:1eb0 with SMTP id u10-20020a056e021a4a00b0036a38481eb0mr3122853ilv.9.1713978771653; Wed, 24 Apr 2024 10:12:51 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713978771; cv=pass; d=google.com; s=arc-20160816; b=BJ76AsXnEePHzpLFlvO7U+wnoqUmp+JfMujVBRNYSFIQGuiWEHKQzUMrh9VoBEBvnR bNet6wtw9JGvBUaU3g4fSX9CaV4PVEhkHMqww+VpDIjIbMliuUNxXUw3sU7r6f4GLDO+ rRBM7kqgz27Ojw5bZNVQ+FTQCMmRpu4L31I9jUHuJXwemjfl0Jlv2lvckadP4w0ClErN Q8sfvAs8EAdT3wSwxRMmneYQXfvU1+jCaSTF3KCV98UqfnkezOj/Oe0NsRxP7zRSlmHU hciTnbXKsNT8rwUSNR4EyoMkudtCmjlebfIc2uoz/rBlEuHQVpaXWix3rcfqTg/7WTeI h4PQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :dkim-signature; bh=nQ7sKmG23w29U3GToy4FxDon2c72o/FEhl4R/uH8fKw=; fh=wjVvAKfMXd9K9H26ELzTR0lHq905Yoim0o0vwQGsNiY=; b=TP5zBJPmjws4NlGRMvpggk8k07VpRtSoOajGWtcWv1LNGLyaOu96l+p/usr46n2Lwu UH89PBHPUQzy9fsN6tnrtnnE1bOfFEv0ipWdbQIfiXUbfflcITA8SgN2fMBdKnaMvgC8 nK504MuwO9tS0twFZqQ2dvLg9/RRLsUgkufvc0746VtptjcDfBp0SMly9ePp4gJvhF/n Yq5d/7vbRvjj3Zdcvi3lhQNNySb4YuYI4vYSkyxwce7/04CwETvnink9tVX4C9LAD+QR yMCVMG2plDR35VILzvfFx4moR/MM+H82t11EsZii+N66oNDbvUZLc0SsfUNPw4Zqac7d kzjA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hlgk8zRo; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-157373-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-157373-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id l188-20020a633ec5000000b0060068c8f895si5448379pga.692.2024.04.24.10.12.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Apr 2024 10:12:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-157373-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hlgk8zRo; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-157373-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-157373-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 2FF7D283D15 for ; Wed, 24 Apr 2024 17:12:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 42AA316D338; Wed, 24 Apr 2024 17:12:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="hlgk8zRo" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 69A3F16D323; Wed, 24 Apr 2024 17:12:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713978754; cv=none; b=MsOvCIt2ORF/nYNfDjhdh535KAm1F+45JtHMvFPaksF7/U3wt9xKVWnR/R20wDX3o33JBKh+sJYeTVXZZGjCuzHTdU3F+hV4xf2Yn8om42ds9rC9MFAnJqHk83fgoPsm+2812fseTpz3BqJU8zxwKEHzQRNW5AR33b8tA9IdY68= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713978754; c=relaxed/simple; bh=Kkt+YSmlIUMjWbiX/GoYafA5lRKE9xD3stveC0qUvmA=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=eHiC0R/hvPdafp2saMh71Ye82lXYuFvsrdqSLMRj8odYmULNLjM/Brhx6z+IeOjU1zmi+Ps+p1B0IyOYqt6N+1Yv7EkS2aPUxhDpdtAU8ZdWuIVt4PyXlcgIYSNWWFCq8P/2xeWUDiaXFxiPNPktfVIt5B5ipUPhNuuSMyLZTco= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=hlgk8zRo; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0ACD4C2BD11; Wed, 24 Apr 2024 17:12:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713978754; bh=Kkt+YSmlIUMjWbiX/GoYafA5lRKE9xD3stveC0qUvmA=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=hlgk8zRoBFgiTu4cHuAAFfiJOpNQb6jzqeB6PI52v5ko9LqOPIQE2+LsSKFYiQrHA EQmHaurrWmx4TuISFEKERvO9wxwQcL6uDtkKQ8zfhph95ixEZuTAxAfHVp83hJnCW/ J1bmUs6FDSfIYRU3LaiRGoXfbCGeyQFoltGQXJlUEqqO2lBB0A4BoFrtEAE7NF94+3 fy8BEg+X3ag4Ok9hJEe/r7NeaFqmnoB1svunfOoOQf/YsYx96WgupX5AYPGetm9PGh L2dyOG+FKGdqp9/GB96SpIJr5SOa9iINPG3PFhnBoCY/ab7JVfGazBLFO3wEnWWdiw NK6nebuAQnOKA== Received: by mail-lf1-f42.google.com with SMTP id 2adb3069b0e04-51b2f105829so38715e87.3; Wed, 24 Apr 2024 10:12:33 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCX+CHVoAW7a56ptjm5+Nj7LzEy8b9tF0DYEaUcDGxiX0OPV2uGKReN6lh8tuLRRGhj8xkO7nOVZ/zDJmd+IWcZTJlZLpOjKtGqfNiss X-Gm-Message-State: AOJu0Yz4tvTkmvnYGh3ce3flUABZdRiqf5XdFd5sC8400JpVvrtIHcvD hMCq1naWbodAtIMVZKXRetFgVSwGYoV2UegsGYHX/bgIIyt6CbKYSay2pqA2E7w7VGeJt8D/VlF allnIA/YSmqguLNgpVoiI4CLIV+M= X-Received: by 2002:ac2:5b12:0:b0:51b:2f81:7361 with SMTP id v18-20020ac25b12000000b0051b2f817361mr2649433lfn.57.1713978752374; Wed, 24 Apr 2024 10:12:32 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240411004907.649394-1-yu.c.chen@intel.com> In-Reply-To: From: Ard Biesheuvel Date: Wed, 24 Apr 2024 19:12:21 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2] efi/unaccepted: touch soft lockup during memory accept To: Chen Yu Cc: linux-efi@vger.kernel.org, "Kirill A. Shutemov" , Vlastimil Babka , Nikolay Borisov , Chao Gao , linux-kernel@vger.kernel.org, "Hossain, Md Iqbal" Content-Type: text/plain; charset="UTF-8" On Mon, 22 Apr 2024 at 16:40, Chen Yu wrote: > > On 2024-04-11 at 08:49:07 +0800, Chen Yu wrote: > > Commit 50e782a86c98 ("efi/unaccepted: Fix soft lockups caused > > by parallel memory acceptance") has released the spinlock so > > other CPUs can do memory acceptance in parallel and not > > triggers softlockup on other CPUs. > > > > However the softlock up was intermittent shown up if the memory > > of the TD guest is large, and the timeout of softlockup is set > > to 1 second. > > > > The symptom is: > > When the local irq is enabled at the end of accept_memory(), > > the softlockup detects that the watchdog on single CPU has > > not been fed for a while. That is to say, even other CPUs > > will not be blocked by spinlock, the current CPU might be > > stunk with local irq disabled for a while, which hurts not > > only nmi watchdog but also softlockup. > > > > Chao Gao pointed out that the memory accept could be time > > costly and there was similar report before. Thus to avoid > > any softlocup detection during this stage, give the > > softlockup a flag to skip the timeout check at the end of > > accept_memory(), by invoking touch_softlockup_watchdog(). > > > > Fixes: 50e782a86c98 ("efi/unaccepted: Fix soft lockups caused by parallel memory acceptance") > > Reported-by: "Hossain, Md Iqbal" > > Reviewed-by: Kirill A. Shutemov > > Signed-off-by: Chen Yu > > --- > > v1 -> v2: > > Refine the commit log and add fixes tag/reviewed-by tag from Kirill. > > Gently pinging about this patch. > Queued up in efi/urgent now, thanks.