All of lore.kernel.org
 help / color / mirror / Atom feed
From: gilles.chanteperdrix@xenomai.org (Gilles Chanteperdrix)
To: linux-arm-kernel@lists.infradead.org
Subject: doubts about switch_mm
Date: Thu, 02 Aug 2012 21:08:19 +0200	[thread overview]
Message-ID: <501AD023.3020204@xenomai.org> (raw)


Hi, 

I know that switch_mm has been like this for years, and that it seems 
to work, but still, something seems wrong:

switch_mm code, as of 3.5 contains:

1        if (!cpumask_test_and_set_cpu(cpu, mm_cpumask(next)) || prev != next) {  
2                check_and_switch_context(next, tsk);                             
3                if (cache_is_vivt())                                             
4                        cpumask_clear_cpu(cpu, mm_cpumask(prev));                
5        }                                                                        

Line 1 seems to mean that maybe switch_mm is called with prev == next.
But then, what line 4 does is certainly wrong if prev == next.

Regards.

-- 
                                                                Gilles.

             reply	other threads:[~2012-08-02 19:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-02 19:08 Gilles Chanteperdrix [this message]
2012-08-02 19:49 ` doubts about switch_mm Russell King - ARM Linux
2012-08-02 20:02   ` Gilles Chanteperdrix
2012-08-02 20:05     ` Gilles Chanteperdrix

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=501AD023.3020204@xenomai.org \
    --to=gilles.chanteperdrix@xenomai.org \
    --cc=linux-arm-kernel@lists.infradead.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 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.