From: "tip-bot2 for Peter Zijlstra" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: David Hildenbrand <david@redhat.com>,
"Peter Zijlstra (Intel)" <peterz@infradead.org>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: perf/core] mm/gup: Use raw_seqcount_try_begin()
Date: Mon, 02 Dec 2024 11:14:11 -0000 [thread overview]
Message-ID: <173313805159.412.6588100615473123377.tip-bot2@tip-bot2> (raw)
The following commit has been merged into the perf/core branch of tip:
Commit-ID: 7528585290a1a1d4e0fb4b72261eb2d8c85de2d7
Gitweb: https://git.kernel.org/tip/7528585290a1a1d4e0fb4b72261eb2d8c85de2d7
Author: Peter Zijlstra <peterz@infradead.org>
AuthorDate: Fri, 22 Nov 2024 12:47:48 +01:00
Committer: Peter Zijlstra <peterz@infradead.org>
CommitterDate: Mon, 02 Dec 2024 12:01:37 +01:00
mm/gup: Use raw_seqcount_try_begin()
David pointed out that gup_fast() does exactly what the new
raw_seqcount_try_begin() does -- use it.
Suggested-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: David Hildenbrand <david@redhat.com>
---
mm/gup.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/mm/gup.c b/mm/gup.c
index 746070a..81ffbd8 100644
--- a/mm/gup.c
+++ b/mm/gup.c
@@ -3351,8 +3351,7 @@ static unsigned long gup_fast(unsigned long start, unsigned long end,
return 0;
if (gup_flags & FOLL_PIN) {
- seq = raw_read_seqcount(¤t->mm->write_protect_seq);
- if (seq & 1)
+ if (!raw_seqcount_try_begin(¤t->mm->write_protect_seq, seq))
return 0;
}
reply other threads:[~2024-12-02 11:14 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=173313805159.412.6588100615473123377.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=david@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=peterz@infradead.org \
--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
all inboxes | Powered by JetHome®