[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LNX.2.00.1407021459330.1655@pobox.suse.cz>
Date: Wed, 2 Jul 2014 15:01:16 +0200 (CEST)
From: Jiri Kosina <jkosina@...e.cz>
To: One Thousand Gnomes <gnomes@...rguk.ukuu.org.uk>
cc: Tejun Heo <tj@...nel.org>, Jiri Slaby <jslaby@...e.cz>,
Stephen Rothwell <sfr@...b.auug.org.au>,
linux-kernel@...r.kernel.org, rostedt@...dmis.org,
mingo@...hat.com, akpm@...ux-foundation.org, andi@...stfloor.org,
paulmck@...ux.vnet.ibm.com, pavel@....cz, jirislaby@...il.com,
Vojtech Pavlik <vojtech@...e.cz>, Michael Matz <matz@...e.de>
Subject: Re: kGraft to -next [was: 00/21 kGraft]
On Wed, 2 Jul 2014, One Thousand Gnomes wrote:
> > > > https://git.kernel.org/cgit/linux/kernel/git/jirislaby/kgraft.git/log/?h=kgraft
> > >
> > > Stephen,
> > >
> > > may I ask you to add the kGraft tree to -next?
> > >
> > > git://git.kernel.org/pub/scm/linux/kernel/git/jirislaby/kgraft.git#kgraft
> >
> > Do we have consensus on the approach? I personally really don't like
> > the fact that it's adding another aspect to kthread management which
> > is difficult to get right and nearly impossible to verify
> > automatically.
>
> Nor me. I don't see why it can't use the kernel freeze functionality ?
Well, we are, see the patch no. 9. It all boils down basically to
[ ... ]
diff --git a/include/linux/freezer.h b/include/linux/freezer.h
index 7fd81b8c4897..e08c3bef251b 100644
--- a/include/linux/freezer.h
+++ b/include/linux/freezer.h
@@ -61,6 +61,8 @@ static inline bool try_to_freeze_unsafe(void)
static inline bool try_to_freeze(void)
{
+ kgr_task_safe(current);
+
if (!(current->flags & PF_NOFREEZE))
debug_check_no_locks_held();
return try_to_freeze_unsafe();
[ ... ]
Then there are non-freezable kernel threads. We are currently handling
those explicitly, but I agree it can be argued that they might not require
any special handling at all, given they claimed themselves explicitly
non-freezable.
--
Jiri Kosina
SUSE Labs
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists