Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1176630

Re: [PATCH 6/6] net: mvneta: Statically assign queues to CPUs

From Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Newsgroups linux.kernel
Subject Re: [PATCH 6/6] net: mvneta: Statically assign queues to CPUs
Date 2015-07-03 16:50 +0200
Message-ID <pIarT-1ha-7@gated-at.bofh.it> (permalink)
References <pIaid-1dJ-9@gated-at.bofh.it> <pIaie-1dJ-27@gated-at.bofh.it>
Organization Free Electrons

Show all headers | View raw


Maxime,

On Fri,  3 Jul 2015 16:25:51 +0200, Maxime Ripard wrote:

> +static void mvneta_percpu_enable(void *arg)
> +{
> +	struct mvneta_port *pp = arg;
> +
> +	enable_percpu_irq(pp->dev->irq, IRQ_TYPE_NONE);
> +}
> +
>  static int mvneta_open(struct net_device *dev)
>  {
>  	struct mvneta_port *pp = netdev_priv(dev);
> @@ -2655,6 +2662,19 @@ static int mvneta_open(struct net_device *dev)
>  		goto err_cleanup_txqs;
>  	}
>  
> +	/*
> +	 * Even though the documentation says that request_percpu_irq
> +	 * doesn't enable the interrupts automatically, it actually
> +	 * does so on the local CPU.
> +	 *
> +	 * Make sure it's disabled.
> +	 */
> +	disable_percpu_irq(pp->dev->irq);
> +
> +	/* Enable per-CPU interrupt on the one CPU we care about */
> +	smp_call_function_single(rxq_def % num_online_cpus(),
> +				 mvneta_percpu_enable, pp, true);

What happens if that CPU goes offline through CPU hotplug?

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/6] net: mvneta: Switch to per-CPU irq and make rxq_def useful Maxime Ripard <maxime.ripard@free-electrons.com> - 2015-07-03 16:40 +0200
  [PATCH 6/6] net: mvneta: Statically assign queues to CPUs Maxime Ripard <maxime.ripard@free-electrons.com> - 2015-07-03 16:40 +0200
    Re: [PATCH 6/6] net: mvneta: Statically assign queues to CPUs Thomas Petazzoni <thomas.petazzoni@free-electrons.com> - 2015-07-03 16:50 +0200
  [PATCH 4/6] net: mvneta: Handle per-cpu interrupts Maxime Ripard <maxime.ripard@free-electrons.com> - 2015-07-03 16:40 +0200
  [PATCH 5/6] net: mvneta: Allow different queues Maxime Ripard <maxime.ripard@free-electrons.com> - 2015-07-03 16:40 +0200
  [PATCH 3/6] irqchip: armada-370-xp: Rework per-cpu interrupts handling Maxime Ripard <maxime.ripard@free-electrons.com> - 2015-07-03 16:40 +0200

csiph-web