linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Jason Cooper <jason@lakedaemon.net>
Cc: Stephen Boyd <sboyd@codeaurora.org>,
	linux-arm-msm@vger.kernel.org,
	Thomas Gleixner <tglx@linutronix.de>,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	Nicolas Pitre <nico@linaro.org>
Subject: Re: [PATCH v4] irqchip: gic: Allow gic_arch_extn hooks to call into scheduler
Date: Sun, 17 Aug 2014 22:41:23 +0100	[thread overview]
Message-ID: <20140817214123.GY30401@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <20140817190434.GJ12769@titan.lakedaemon.net>

On Sun, Aug 17, 2014 at 03:04:34PM -0400, Jason Cooper wrote:
> Quoting Nico:
> 
> "Of course it would be good to clarify things wrt Russell's remark
> independently from this patch."
> 
> I took 'independently' to mean "This patch is ok, *and* we need to
> address Russell's concerns in a follow-up patch."
> 
> Nico's Reviewed-by with that comment was sent August 13th.  The most
> recent activity on this thread was also August 13th.  After four days, I
> reasoned there were no objections to his comment.

Right, during the merge window, and during merge windows, I tend to
ignore almost all email now because people don't stop developing, and
they don't take any notice where the mainline cycle is.  In fact, I go
off and do non-kernel work during a merge window and only briefly scan
for bug fixes.

However, I have other concerns with this patch, which I've yet to air.
For example, I don't like this crappy conditional locking that people
keep dreaming up - that kind of stuff makes the kernel much harder to
statically check that everything is correct.  It's an anti-lockdep
strategy.

Secondly, I don't like this:

+       raw_spin_lock(&gic_sgi_lock);
+       /*
+        * Ensure that the gic_cpu_map update above is seen in
+        * gic_raise_softirq() before we redirect any pending SGIs that
+        * may have been raised for the outgoing CPU (cur_cpu_id)
+        */
+       smp_mb__after_unlock_lock();
+       raw_spin_unlock(&gic_sgi_lock);

That goes against the principle of locking, that you lock the data,
not the code.

I have no problem with changing gic_raise_softirq() to use a different
lock, which gic_migrate_target(), and gic_set_affinity() can also use.
There's no need for horrid locking here, because the only thing we're
protecting is gic_map[] and the write to the register to trigger an
IPI - and nothing using gic_arch_extn has any business knowing about
SGIs.

No need for these crappy sgi_map_lock() macros and all the ifdeffery.

-- 
FTTC broadband for 0.8mile line: currently at 9.5Mbps down 400kbps up
according to speedtest.net.

  reply	other threads:[~2014-08-17 21:41 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-13 13:57 [PATCH v4] irqchip: gic: Allow gic_arch_extn hooks to call into scheduler Stephen Boyd
2014-08-13 14:22 ` Russell King - ARM Linux
2014-08-13 14:53   ` Daniel Thompson
2014-08-13 14:55   ` Stephen Boyd
2014-08-13 15:05     ` Russell King - ARM Linux
2014-08-13 15:31       ` Stephen Boyd
2014-08-13 15:44 ` Nicolas Pitre
2014-08-17 17:32 ` Jason Cooper
2014-08-17 18:55   ` Russell King - ARM Linux
2014-08-17 19:04     ` Jason Cooper
2014-08-17 21:41       ` Russell King - ARM Linux [this message]
2014-08-18  0:17         ` Nicolas Pitre
2014-08-20 19:11           ` Stephen Boyd
2014-08-18  1:32         ` Jason Cooper
2014-08-18  0:04       ` Nicolas Pitre
2014-08-18  1:25         ` Jason Cooper
2014-08-18  1:35           ` Nicolas Pitre
2014-08-18  1:54             ` Jason Cooper
2014-08-18  2:18               ` Nicolas Pitre
2014-08-20 19:16               ` Stephen Boyd

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=20140817214123.GY30401@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=jason@lakedaemon.net \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nico@linaro.org \
    --cc=sboyd@codeaurora.org \
    --cc=tglx@linutronix.de \
    /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;
as well as URLs for NNTP newsgroup(s).