From: Peter Zijlstra <peterz@infradead.org>
To: "Bruno Prémont" <bonbons@linux-vserver.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
Ingo Molnar <mingo@kernel.org>,
Peter Hurley <peter@hurleysoftware.com>,
Davidlohr Bueso <dave@stgolabs.net>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
Ilya Dryomov <ilya.dryomov@inktank.com>,
Mike Galbraith <umgwanakikbuti@gmail.com>,
Oleg Nesterov <oleg@redhat.com>
Subject: Re: Linux 3.19-rc5
Date: Fri, 6 Feb 2015 12:50:51 +0100 [thread overview]
Message-ID: <20150206115051.GL23123@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <20150205221436.01bc24f2@neptune.home>
On Thu, Feb 05, 2015 at 10:14:36PM +0100, Bruno Prémont wrote:
> The loop is now replaced by a single WARN() trace - I guess expected:
> From my reading of the thread fixing pccardd/sched TASK_RUNNING usage/check
> is another issue left for the future.
Yeah, something like the below will make it go away -- under the
assumption that that comment is actually correct, I don't know, the
pcmcia people should probably write a better comment :/
Also, set_current_state(TASK_RUNNING) is almost always pointless, nobody
cares about that barrier, so make it go away.
---
drivers/pcmcia/cs.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/pcmcia/cs.c b/drivers/pcmcia/cs.c
index 5292db69c426..5678e161a17d 100644
--- a/drivers/pcmcia/cs.c
+++ b/drivers/pcmcia/cs.c
@@ -635,6 +635,12 @@ static int pccardd(void *__skt)
skt->sysfs_events = 0;
spin_unlock_irqrestore(&skt->thread_lock, flags);
+ /*
+ * Supposedly this is a rarely contended mutex and
+ * sleeping is therefore unlikely, the occasional
+ * extra loop iteration is harmless.
+ */
+ sched_annotate_sleep();
mutex_lock(&skt->skt_mutex);
if (events & SS_DETECT)
socket_detect_change(skt);
@@ -679,7 +685,7 @@ static int pccardd(void *__skt)
try_to_freeze();
}
/* make sure we are running before we exit */
- set_current_state(TASK_RUNNING);
+ __set_current_state(TASK_RUNNING);
/* shut down socket, if a device is still present */
if (skt->state & SOCKET_PRESENT) {
next prev parent reply other threads:[~2015-02-06 11:51 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-18 9:17 Linux 3.19-rc5 Linus Torvalds
2015-01-19 18:02 ` Bruno Prémont
2015-01-20 6:24 ` Linus Torvalds
2015-01-21 20:37 ` Bruno Prémont
2015-01-21 21:37 ` Bruno Prémont
2015-01-21 22:12 ` Davidlohr Bueso
2015-01-21 22:54 ` Peter Hurley
2015-01-30 1:22 ` Rafael J. Wysocki
2015-01-30 1:12 ` Linus Torvalds
2015-01-30 1:25 ` Linus Torvalds
2015-01-30 1:35 ` Linus Torvalds
2015-01-30 2:06 ` Rafael J. Wysocki
2015-01-30 15:47 ` Oleg Nesterov
2015-01-31 18:32 ` Linus Torvalds
2015-01-31 20:16 ` Peter Zijlstra
2015-01-31 21:54 ` Linus Torvalds
2015-02-02 13:19 ` Peter Zijlstra
2015-02-01 19:43 ` Oleg Nesterov
2015-02-01 20:09 ` Linus Torvalds
2015-02-01 20:19 ` Oleg Nesterov
2015-02-02 15:34 ` Peter Zijlstra
2015-01-31 9:16 ` Bruno Prémont
2015-01-31 9:48 ` Peter Zijlstra
2015-02-03 11:18 ` Ingo Molnar
2015-02-05 21:14 ` Bruno Prémont
2015-02-06 11:50 ` Peter Zijlstra [this message]
2015-02-06 16:02 ` Linus Torvalds
2015-02-06 16:39 ` Peter Zijlstra
2015-02-06 16:46 ` Linus Torvalds
2015-01-30 1:49 ` Rafael J. Wysocki
2015-02-02 9:48 ` Zdenek Kabelac
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=20150206115051.GL23123@twins.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=bonbons@linux-vserver.org \
--cc=dave@stgolabs.net \
--cc=ilya.dryomov@inktank.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=oleg@redhat.com \
--cc=peter@hurleysoftware.com \
--cc=rjw@rjwysocki.net \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=umgwanakikbuti@gmail.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