From: Ralf Baechle <ralf@linux-mips.org>
To: Jun Sun <jsun@mvista.com>
Cc: Juan Quintela <quintela@mandrakesoft.com>, linux-mips@linux-mips.org
Subject: Re: [RFC & PATCH] fixing tlb flush race problem on smp
Date: Wed, 29 Jan 2003 09:06:27 +0100 [thread overview]
Message-ID: <20030129090627.D7741@linux-mips.org> (raw)
In-Reply-To: <20030127170346.S11633@mvista.com>; from jsun@mvista.com on Mon, Jan 27, 2003 at 05:03:46PM -0800
On Mon, Jan 27, 2003 at 05:03:46PM -0800, Jun Sun wrote:
> I also find a stupid typo and a subtle hole in my original patch.
> Here is an updated version, for 2.4/mips only. If it looks ok, I
> will extend to other sub-arches/trees.
>
> This new one is pretty nice in that all mmu related operations
> are put into one file and it is much easier to ensure correctness
> later.
I like this one.
> +
> + /*
> + * Mark current->active_mm as not "active" anymore.
> + * We don't want to mislead possible IPI tlb flush routines.
> + */
> + clear_bit(cpu, &prev->cpu_vm_mask);
> + set_bit(cpu, &next->cpu_vm_mask);
> +
> + local_irq_restore(flags);
I don't think it's necessary to protect the clear_bit and set_bit operations
with local_irq_save ... local_irq_restore.
In addition because switch_mm is always called with interrupts enabled you
can simplify that to local_irq_disable ... local_irq_enable.
Ralf
next prev parent reply other threads:[~2003-01-29 8:06 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-21 22:37 [RFC & PATCH] fixing tlb flush race problem on smp Jun Sun
2003-01-22 7:43 ` Juan Quintela
2003-01-28 1:03 ` Jun Sun
2003-01-29 8:06 ` Ralf Baechle [this message]
2003-02-05 0:02 ` Jun Sun
2003-02-05 0:02 ` Jun Sun
2003-02-14 4:48 ` Atsushi Nemoto
2003-02-14 11:06 ` Maciej W. Rozycki
2003-01-29 7:28 ` Ralf Baechle
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=20030129090627.D7741@linux-mips.org \
--to=ralf@linux-mips.org \
--cc=jsun@mvista.com \
--cc=linux-mips@linux-mips.org \
--cc=quintela@mandrakesoft.com \
/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