mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Shaohua Li <shaohua.li@intel.com>
Cc: lkml <linux-kernel@vger.kernel.org>, Ingo Molnar <mingo@elte.hu>,
	Andi Kleen <andi@firstfloor.org>, "hpa@zytor.com" <hpa@zytor.com>
Subject: Re: [RFC 4/4]x86: avoid tlbstate lock if no enough cpus
Date: Thu, 04 Nov 2010 06:42:46 +0100	[thread overview]
Message-ID: <1288849366.2718.42.camel@edumazet-laptop> (raw)
In-Reply-To: <1288848079.23014.131.camel@sli10-conroe>

Le jeudi 04 novembre 2010 à 13:21 +0800, Shaohua Li a écrit :
> On Wed, 2010-11-03 at 17:08 +0800, Eric Dumazet wrote:
> > Le mercredi 03 novembre 2010 à 16:41 +0800, Shaohua Li a écrit :
> > 
> > > yes, this is ok. we might need avoid some cpu hotplug race too. I'll
> > > post a new patch later.
> > > 
> > > 
> > 
> > Hmm, maybe only set the variable "must take the lock", never unset it.
> I followed your suggestions to use nr_cpu_ids, it should be good enough.
> 

Yes, unfortunately not on HP machines, because of their tendency to have
holes in CPU numberings :)

This can probably can improved later.

Thanks

> Thanks,
> Shaohua
> 
> 
> This one isn't related to previous patch. If online cpus are below
> NUM_INVALIDATE_TLB_VECTORS, we don't need the lock. The comments
> in the code declares we don't need the check, but a hot lock still
> needs an atomic operation and expensive, so add the check here.
> 
> Uses nr_cpu_ids here as suggested by Eric Dumazet.
> 
> Signed-off-by: Shaohua Li <shaohua.li@intel.com>
> ---

Acked-by: Eric Dumazet <eric.dumazet@gmail.com>




      reply	other threads:[~2010-11-04  5:43 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-03  6:44 Shaohua Li
2010-11-03  6:59 ` Eric Dumazet
2010-11-03  7:06   ` Shaohua Li
2010-11-03  7:12     ` Eric Dumazet
2010-11-03  7:19       ` Shaohua Li
2010-11-03  7:25         ` Eric Dumazet
2010-11-03  7:31           ` Eric Dumazet
     [not found]             ` <1288773716.23014.124.camel@sli10-conroe>
2010-11-03  9:08               ` Eric Dumazet
2010-11-04  5:21                 ` Shaohua Li
2010-11-04  5:42                   ` Eric Dumazet [this message]

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=1288849366.2718.42.camel@edumazet-laptop \
    --to=eric.dumazet@gmail.com \
    --cc=andi@firstfloor.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=shaohua.li@intel.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

all inboxes | Powered by JetHome®