All of lore.kernel.org
 help / color / mirror / Atom feed
From: Frederic Weisbecker <fweisbec@gmail.com>
To: Chris Metcalf <cmetcalf@ezchip.com>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] nohz: prevent tilegx network driver interrupts
Date: Sat, 11 Jul 2015 16:30:34 +0200	[thread overview]
Message-ID: <20150711143033.GE10257@lerouge> (raw)
In-Reply-To: <55A0175E.2010200@ezchip.com>

On Fri, Jul 10, 2015 at 03:05:02PM -0400, Chris Metcalf wrote:
> On 07/10/2015 02:24 PM, Frederic Weisbecker wrote:
> >Indeed we are doing more and more references on housekeeping_mask, so
> >we should probably think about an off-case.
> >
> >Now the nohz-full off-case should rather be cpu_possible_mask than
> >cpu_online_mask. housekeeping_mask doesn't take into account onlining
> >at all.
> 
> That suggests that in this case, we might want to default to
> something like "housekeeping_mask & cpu_online_mask",
> since you really don't want to send irqs to offline cores to
> process your packets :-)

In any case it must be up to the drivers to do that. Define
housekeeping_mask as a subset of the online mask complicates a lot
of things. It pushes hotplug complexity to the nohz code for no
reasons. It's up to the drivers and subsystems to handle that really.

> 
> The tilegx chips typically don't do cpu offlining anyway, since
> we've never really found a usecase, so whatever you boot with
> you always have available.  We do have support for a bare-metal
> mode which you can run on some of the cores, so you may start
> with fewer than cpu_possible actually running, but it will always
> be that same set of cores.

And that bare metal mode runs out of Linux?

Note that in nohz_full, The boot CPU can't be offline anyway.

> 
> So this does suggest that my original patch is wrong for that
> same reason.
> 
> >>2. Provide an accessor that returns the cpumask to use for housekeeping
> >>    chores and implement it in the obvious ways for both nohz_full
> >>    and non-nohz_full.
> >>
> >>The latter seems like arguably the most satisfying approach, but
> >>the patch below is, if nothing else, suitable to push for 4.3
> >>without any further API development work.
> >I don't know. 1) looks easier.
> 
> On reflection, the problem with (1) is that if you are in NO_HZ_FULL
> mode but !tick_nohz_full_enabled(), you want to fall back to just
> using cpu_possible_mask anyway.  So I think a simple accessor that
> returns an appropriate cpumask pointer is probably the best bet
> (along the lines of the existing is_housekeeping_cpu() accessor).

Ok!


  parent reply	other threads:[~2015-07-11 14:30 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-10 17:33 [PATCH] nohz: prevent tilegx network driver interrupts Chris Metcalf
2015-07-10 18:24 ` Frederic Weisbecker
2015-07-10 19:05   ` Chris Metcalf
2015-07-10 19:37     ` [PATCH v2] " Chris Metcalf
2015-07-10 22:45       ` Josh Cartwright
2015-07-10 23:06         ` Chris Metcalf
2015-07-10 23:12           ` Josh Cartwright
2015-07-11 14:44       ` Frederic Weisbecker
2015-07-11 15:04         ` Chris Metcalf
2015-07-11 14:30     ` Frederic Weisbecker [this message]
2015-07-20 21:22       ` [PATCH] " Chris Metcalf
2015-07-20 21:49         ` Frederic Weisbecker
2015-07-20 22:15           ` Chris Metcalf

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=20150711143033.GE10257@lerouge \
    --to=fweisbec@gmail.com \
    --cc=cmetcalf@ezchip.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.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.