linux-mips
[Top] [All Lists]

Re: [PATCH RESEND 1/9] MIPS: Add local_flush_tlb_all_mm to clear all mm

To: Kevin Cernekee <cernekee@gmail.com>
Subject: Re: [PATCH RESEND 1/9] MIPS: Add local_flush_tlb_all_mm to clear all mm contexts on calling cpu
From: Ralf Baechle <ralf@linux-mips.org>
Date: Tue, 8 Nov 2011 16:47:12 +0000
Cc: linux-mips@linux-mips.org, Maksim Rayskiy <maksim.rayskiy@gmail.com>, "Kevin D. Kissell" <kevink@paralogos.com>, Sergey Shtylyov <sshtylyov@mvista.com>
In-reply-to: <c2c8833593cb8eeef5c102468e105497@localhost>
References: <c2c8833593cb8eeef5c102468e105497@localhost>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.5.21 (2010-09-15)
On Sat, Nov 05, 2011 at 02:21:10PM -0700, Kevin Cernekee wrote:

> +void local_flush_tlb_all_mm(void)
> +{
> +     struct task_struct *p;
> +
> +     for_each_process(p)
> +             if (p->mm)
> +                     local_flush_tlb_mm(p->mm);

Aside of for_each_process being a potencially very heavy iterator - there
can be thousands of threads on some systems, even embedded systems I'm
missing the task_list lock being taken so bad things could happen.

  Ralf

<Prev in Thread] Current Thread [Next in Thread>