From: Michel Lespinasse <walken@google.com>
To: linux-mm@kvack.org
Subject: x86_64 remote tlb invalidation
Date: Tue, 5 May 2009 20:01:14 -0700 [thread overview]
Message-ID: <20090506030114.GA31320@google.com> (raw)
Reading through arch/x86/kernel/tlb_64.c, I've been wondering why
the code for native_flush_tlb_others() can't be simplified as follows:
--- linux-2.6.29.2.orig/arch/x86/kernel/tlb_64.c 2009-04-27 10:37:11.000000000 -0700
+++ linux-2.6.29.2/arch/x86/kernel/tlb_64.c 2009-05-05 16:53:07.770085000 -0700
@@ -180,7 +180,7 @@
f->flush_mm = mm;
f->flush_va = va;
- cpus_or(f->flush_cpumask, cpumask, f->flush_cpumask);
+ f->flush_cpumask = cpumask;
/*
* Make the above memory operations globally visible before
My reasoning:
* The previous invocation of native_flush_tlb_others() waited for
f->flush_cpumask to be cleared before it unlocked f->tlbstate_lock;
* sets bits in the flush_cpumask field of union smp_flush_state without
holding the correwsponding tlbstate_lock;
* Therefore, f->flush_cpumask must still be cleared when the next invocation
of native_flush_tlb_others() reacquires f->tlbstate_lock.
I don't think I missed anything, did I ?
Thanks,
--
Michel "Walken" Lespinasse
A program is never fully debugged until the last user dies.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
reply other threads:[~2009-05-06 3:01 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=20090506030114.GA31320@google.com \
--to=walken@google.com \
--cc=linux-mm@kvack.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 NNTP newsgroup(s).