From: Manfred Spraul <manfred@colorfullife.com>
To: Martin Hicks <mort@wildopensource.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Reduce TLB flushing during process migration
Date: Tue, 17 Feb 2004 17:22:14 +0100 [thread overview]
Message-ID: <40323FB6.1030208@colorfullife.com> (raw)
Martin wrote:
>diff -Nru a/kernel/sched.c b/kernel/sched.c
>--- a/kernel/sched.c Tue Feb 17 07:33:59 2004
>+++ b/kernel/sched.c Tue Feb 17 07:33:59 2004
>@@ -25,6 +25,7 @@
> #include <linux/highmem.h>
> #include <linux/smp_lock.h>
> #include <asm/mmu_context.h>
>+#include <asm/tlbflush.h>
> #include <linux/interrupt.h>
> #include <linux/completion.h>
> #include <linux/kernel_stat.h>
>@@ -1135,6 +1136,14 @@
> task_rq_unlock(rq, &flags);
> wake_up_process(rq->migration_thread);
> wait_for_completion(&req.done);
>+
>+ /*
>+ * we want a new context here. This eliminates TLB
>+ * flushes on the cpus where the process executed prior to
>+ * the migration.
>+ */
>+ flush_tlb_mm(current->mm);
>+
>
>
I think flush_tlb_mm() is the wrong function - e.g. for i386, it's a
wasted flush, because i386 disconnects previous cpus from the tlb flush
automatically.
And it's always the wrong thing if you've migrated one thread of a task
that runs on multiple cpus. I think you need a new hook.
--
Manfred
next reply other threads:[~2004-02-17 16:22 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-17 16:22 Manfred Spraul [this message]
2004-02-17 18:08 ` [PATCH] Reduce TLB flushing during process migration David S. Miller
2004-02-17 20:05 ` Martin Hicks
2004-02-17 20:08 ` David S. Miller
2004-02-17 20:37 ` Martin Hicks
-- strict thread matches above, loose matches on Subject: below --
2004-05-22 12:11 Jack Steiner
2004-05-25 5:26 ` Andrew Morton
2004-05-25 13:45 ` Jack Steiner
2004-06-01 15:59 ` Jack Steiner
2004-02-17 15:49 Martin Hicks
2004-02-17 18:07 ` David S. Miller
2004-02-17 20:50 ` Andrew Morton
2004-02-17 22:01 ` Martin Hicks
2004-02-18 2:34 ` Rusty Russell
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=40323FB6.1030208@colorfullife.com \
--to=manfred@colorfullife.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mort@wildopensource.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.