Linux-EFI Archive mirror
 help / color / mirror / Atom feed
From: Michael Roth <michael.roth@amd.com>
To: "Kirill A . Shutemov" <kirill.shutemov@linux.intel.com>
Cc: <linux-efi@vger.kernel.org>, <x86@kernel.org>,
	<linux-coco@lists.linux.dev>, <linux-mm@kvack.org>,
	<linux-kernel@vger.kernel.org>, Ard Biesheuvel <ardb@kernel.org>,
	"Vlastimil Babka" <vbabka@suse.cz>,
	Nikolay Borisov <nik.borisov@suse.com>, <stable@kernel.org>,
	Tom Lendacky <thomas.lendacky@amd.com>,
	Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [PATCH] efi/unaccepted: Fix off-by-one when checking for overlapping ranges
Date: Fri, 3 Nov 2023 10:15:31 -0500	[thread overview]
Message-ID: <20231103151531.7e374teoxeekcrlm@amd.com> (raw)
In-Reply-To: <20231103145353.5wzcwc5znkzt6vzf@box>

On Fri, Nov 03, 2023 at 05:53:53PM +0300, Kirill A . Shutemov wrote:
> 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@amd.com>
> 
> Otherwise, looks good:
> 
> Reviewed-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>

Thanks! Sending a v2 with suggested changes.

-Mike

> > 
> 
> -- 
>   Kiryl Shutsemau / Kirill A. Shutemov

      reply	other threads:[~2023-11-03 15:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-03 14:26 [PATCH] efi/unaccepted: Fix off-by-one when checking for overlapping ranges Michael Roth
2023-11-03 14:53 ` Kirill A . Shutemov
2023-11-03 15:15   ` Michael Roth [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231103151531.7e374teoxeekcrlm@amd.com \
    --to=michael.roth@amd.com \
    --cc=ardb@kernel.org \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-coco@lists.linux.dev \
    --cc=linux-efi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=nik.borisov@suse.com \
    --cc=pbonzini@redhat.com \
    --cc=stable@kernel.org \
    --cc=thomas.lendacky@amd.com \
    --cc=vbabka@suse.cz \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).