Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp3243404rdg; Tue, 17 Oct 2023 08:36:52 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHHo6CH5Pjs3kmz/99zxoThCzvGv5mj8b0mh0JF5cL++Ouk41u+D5a5XM/X16IJd08M7LY0 X-Received: by 2002:a17:902:ea09:b0:1bc:7001:6e62 with SMTP id s9-20020a170902ea0900b001bc70016e62mr3056137plg.35.1697557012280; Tue, 17 Oct 2023 08:36:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697557012; cv=none; d=google.com; s=arc-20160816; b=vM3rh9Vv6GpZDzFWXV3RnBDqq7UmOareOoNiwMp/lzLRqNmMvOzsJPUBYpO9ZBqRqD 2ErGw6/g5zaeLAPdFnnOJ+zNrf1RdRPGz9uyPfZpzGmpGomnn1XjdXCZCMbH5wE95FBf k6Cq3cwai9AfKQzlyJLoBUKel9VTu6YhQL/tmVIstcfoWnd8p7x7GrbU7FtlFSik0CIe GYUMssyFbTo6I6vs8ybeNrmvg+UBkV57s9hU32D8UtZw3GQi/yOIX7Gz4hsy5wq2p83D 85caOQ415sFikmB0/0fJ56GCrF8s3PAxYppDlrhhO6EUmWlDBf9U+eXutSIAovVMksbM G4/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=zQqT0Icijbvg9S6mB1pNR2Pch3/DSe5rsPVyjDgEit0=; fh=eB6lTdF64uTw8/lbwPKgAnQ0IdUJ3zUceC7IUC26q4o=; b=j9V5044IbW/0TuLzC1Ug2XXjqBbEc0XyekQLWQ9LAHb4u7xBjEeVBugUD+uE7xRXNi 5KucTwyjGm9NcqOUiqCVvotJQeCPzpq/HHUz7+MKyIVM50lASqJ0+djgCEurbf1NPqSw 7pAB4ViMEYcx55fHm79ap5UnsymCkcA1oAdIXwYBWggsEGHqqQ4SQWmT2kMtKaG4cbxP ufTzHL7d8i/Z/6kY2iviAv7sLx6KPNwYP4yehGF6cza/w+N/eyB3nwFz8At28C24d3Jc cD7+FZ7xGzKdTgL8f/0LBWA0WYcxuYGylTjqOfclsMkVDIMP9Z+nUSJxgvdQkzYVMTFz lYsg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=a02DY55D; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id a6-20020a170902ecc600b001ca30930567si2151929plh.373.2023.10.17.08.36.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Oct 2023 08:36:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=a02DY55D; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 01224801B382; Tue, 17 Oct 2023 08:36:51 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344427AbjJQPgq (ORCPT + 99 others); Tue, 17 Oct 2023 11:36:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56522 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344419AbjJQPgp (ORCPT ); Tue, 17 Oct 2023 11:36:45 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0F68B92; Tue, 17 Oct 2023 08:36:44 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id ACA3FC433B6; Tue, 17 Oct 2023 15:36:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1697557003; bh=zQqT0Icijbvg9S6mB1pNR2Pch3/DSe5rsPVyjDgEit0=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=a02DY55Dh1N3RncpLznmFnEklwXDgdJqCFix7A8TuEQgcMLambAx1NdmGxsg8+6BF p2GKMqmgFe3vHsPlfOt6rzwf0LKLL0zDGRFLPeuJ1JcNFHKgeQpwceun8HOISVgehM pxbyWSXEt2cVB1Dlir92Cow1MS04UhtikZEjl0d2y/8qt6ieP26pLYbq2MyWHJPx9x 3pMNY+ORuwqRcSH5Rsfba/nVAxYoBF1y3TU9/S6LDSXUcPtFRDk1Eb7Zkhqvf+iVEx AKu2m3WQZXmCkAZAtVp7vOXydZERSm8EW0flkgI49ZSjvKNJO0pKp9SZujF7Wm1zWF 0BOS0s4IRViJQ== Received: by mail-lj1-f169.google.com with SMTP id 38308e7fff4ca-2c5028e5b88so63172851fa.3; Tue, 17 Oct 2023 08:36:43 -0700 (PDT) X-Gm-Message-State: AOJu0YyPpkDwpjfxI4kao5SgMBiVKiO0nHBre+Ge2apP+avNc87YzIIm 5QufIDk8aVmG+sZHXrx5/2sP/XSU5blomDvhtEY= X-Received: by 2002:a05:651c:54f:b0:2c5:21e3:f1fb with SMTP id q15-20020a05651c054f00b002c521e3f1fbmr2210135ljp.23.1697557001696; Tue, 17 Oct 2023 08:36:41 -0700 (PDT) MIME-Version: 1.0 References: <20231016163122.12855-1-kirill.shutemov@linux.intel.com> <20231016213932.6cscnn6tsnzsnvmf@box.shutemov.name> <20231017101717.GJ33217@noisy.programming.kicks-ass.net> In-Reply-To: <20231017101717.GJ33217@noisy.programming.kicks-ass.net> From: Ard Biesheuvel Date: Tue, 17 Oct 2023 17:36:30 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCHv2] efi/unaccepted: Fix soft lockups caused by parallel memory acceptance To: Peter Zijlstra Cc: "Kirill A. Shutemov" , Matthew Wilcox , Borislav Petkov , Andy Lutomirski , Dave Hansen , Sean Christopherson , Andrew Morton , Joerg Roedel , Andi Kleen , Kuppuswamy Sathyanarayanan , David Rientjes , Vlastimil Babka , Tom Lendacky , Thomas Gleixner , Paolo Bonzini , Ingo Molnar , Dario Faggioli , Mike Rapoport , David Hildenbrand , Mel Gorman , marcelo.cerri@canonical.com, tim.gardner@canonical.com, philip.cox@canonical.com, aarcange@redhat.com, peterx@redhat.com, x86@kernel.org, linux-mm@kvack.org, linux-coco@lists.linux.dev, linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org, stable@kernel.org, Nikolay Borisov Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 17 Oct 2023 08:36:51 -0700 (PDT) On Tue, 17 Oct 2023 at 12:17, Peter Zijlstra wrote: > > On Tue, Oct 17, 2023 at 09:42:13AM +0200, Ard Biesheuvel wrote: > > > One question I have is whether the sequence > > > > spin_lock_irqsave(&unaccepted_memory_lock, flags); > > ... > > spin_unlock(&unaccepted_memory_lock); > > arch_accept_memory(phys_start, phys_end); > > spin_lock(&unaccepted_memory_lock); > > ... > > spin_unlock_irqrestore(&unaccepted_memory_lock, flags); > > > > is considered sound and is supported by all architectures? > > Yes. Thanks for the clarification I've queued this up now (with the cpu_relax() removed)