[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231103145353.5wzcwc5znkzt6vzf@box>
Date: Fri, 3 Nov 2023 17:53:53 +0300
From: "Kirill A . Shutemov" <kirill.shutemov@...ux.intel.com>
To: Michael Roth <michael.roth@....com>
Cc: linux-efi@...r.kernel.org, x86@...nel.org,
linux-coco@...ts.linux.dev, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, Ard Biesheuvel <ardb@...nel.org>,
Vlastimil Babka <vbabka@...e.cz>,
Nikolay Borisov <nik.borisov@...e.com>, stable@...nel.org,
Tom Lendacky <thomas.lendacky@....com>,
Paolo Bonzini <pbonzini@...hat.com>
Subject: Re: [PATCH] efi/unaccepted: Fix off-by-one when checking for
overlapping ranges
On Fri, Nov 03, 2023 at 09:26:50AM -0500, Michael Roth wrote:
> When a thread needs to accept memory it will scan the accepting_list
> to see if any ranges already being processed by other threads overlap
> with its range. Due to an off-by-one in the range comparisons, a thread
> might falsely determine that an overlapping range is being accepted,
> leading to an unnecessary delay before it begins processing the range.
Maybe s/thread/task/g ?
> Fix the off-by-one in the range comparison to prevent this and slightly
> improve performance.
>
> Fixes: 50e782a86c98 ("efi/unaccepted: Fix soft lockups caused by parallel memory acceptance")
> Link: https://lore.kernel.org/linux-mm/20231101004523.vseyi5bezgfaht5i@amd.com/T/#me2eceb9906fcae5fe958b3fe88e41f920f8335b6
> Signed-off-by: Michael Roth <michael.roth@....com>
Otherwise, looks good:
Reviewed-by: Kirill A. Shutemov <kirill.shutemov@...ux.intel.com>
>
--
Kiryl Shutsemau / Kirill A. Shutemov
Powered by blists - more mailing lists