From: Oleg Nesterov <oleg@redhat.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andi Kleen <andi@firstfloor.org>,
Lucas De Marchi <lucas.de.marchi@gmail.com>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Paul Mackerras <paulus@samba.org>,
david@gibson.dropbear.id.au, Kees Cook <keescook@chromium.org>,
Serge Hallyn <serge.hallyn@canonical.com>,
"Rafael J. Wysocki" <rjw@sisk.pl>,
Andrew Morton <akpm@linux-foundation.org>,
Feng Hong <hongfeng@marvell.com>,
Lucas De Marchi <lucas.demarchi@profusion.mobi>
Subject: [PATCH 0/1] poweroff: change orderly_poweroff() to use schedule_work()
Date: Wed, 13 Mar 2013 18:46:41 +0100 [thread overview]
Message-ID: <20130313174641.GA28083@redhat.com> (raw)
In-Reply-To: <20130312203514.GA23488@redhat.com>
On 03/12, Oleg Nesterov wrote:
>
> On 03/12, Linus Torvalds wrote:
> >
> > So yeah, I guess
> > everything could just go into a workqueue.
>
> OK, I'll try to make the patch tomorrow. Should be trivial but it is
> not clear how we should pass "bool force" without allocating the
> work_struct which would be nice to avoid.
Yes, it would be nice to keep it simple and use a single work/arg.
Could you review? The change is trivial but
- orderly_poweroff() always return 0.
- the patch assumes that orderly_poweroff(false) after
orderly_poweroff(true) acts as "force = true". Only xen
uses "false", I hope this is fine.
In fact I think we can change poweroff_force argument
unconditionally, this "if (force)" check is mostly
documentation.
But we can add the locking or even allocate work_struct
every time if this is wrong (or just looks wrong).
- The patch assumes that orderly_poweroff() doesn't need
the keventd_up() check, I hope this is correct...
Lucas, Andrew, sorry. If this patch will be applied, then
kernel-sysc-use-the-simpler-call_usermodehelper.patch
should be dropped. Or I can redo this fix on top of -mm cleanup.
> And. It seems there is another problem. argv_split(poweroff_cmd) can
> obviously race with proc_dostring() ?
I'll send another patch...
Oleg.
next prev parent reply other threads:[~2013-03-13 17:48 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-12 3:25 Regression with orderly_poweroff() Benjamin Herrenschmidt
2013-03-12 14:46 ` Linus Torvalds
2013-03-12 17:46 ` Oleg Nesterov
2013-03-12 17:54 ` Lucas De Marchi
2013-03-12 18:22 ` Oleg Nesterov
2013-03-12 18:42 ` Linus Torvalds
2013-03-12 19:11 ` Oleg Nesterov
2013-03-12 19:20 ` Linus Torvalds
2013-03-12 20:35 ` Oleg Nesterov
2013-03-13 17:46 ` Oleg Nesterov [this message]
2013-03-13 17:47 ` [PATCH 1/1] poweroff: change orderly_poweroff() to use schedule_work() Oleg Nesterov
2013-03-14 22:28 ` Andrew Morton
2013-03-15 16:39 ` Oleg Nesterov
2013-03-16 20:23 ` [PATCH 0/2] finx argv_split() vs sysctl race Oleg Nesterov
2013-03-16 20:23 ` [PATCH 1/2] teach argv_split() to handle the mutable strings Oleg Nesterov
2013-03-18 16:03 ` [PATCH v2 " Oleg Nesterov
2013-03-18 21:53 ` [PATCH " Andrew Morton
2013-03-19 19:54 ` [PATCH -mm] argv_split-teach-it-to-handle-mutable-strings-fix-2 Oleg Nesterov
2013-03-16 20:24 ` [PATCH 2/2] set_task_comm: kill the pointless memset() + wmb() Oleg Nesterov
2013-03-16 20:32 ` [PATCH 0/2] finx argv_split() vs sysctl race Andi Kleen
2013-03-16 20:45 ` Oleg Nesterov
2013-03-16 20:56 ` Andi Kleen
2013-03-16 21:23 ` Oleg Nesterov
2013-03-16 21:54 ` Andi Kleen
2013-03-17 14:15 ` Oleg Nesterov
2013-03-18 16:03 ` Oleg Nesterov
2013-03-13 23:35 ` [PATCH 0/1] poweroff: change orderly_poweroff() to use schedule_work() Lucas De Marchi
2013-03-12 20:13 ` Regression with orderly_poweroff() Andi Kleen
2013-03-12 19:28 ` Benjamin Herrenschmidt
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=20130313174641.GA28083@redhat.com \
--to=oleg@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=andi@firstfloor.org \
--cc=benh@kernel.crashing.org \
--cc=david@gibson.dropbear.id.au \
--cc=hongfeng@marvell.com \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lucas.de.marchi@gmail.com \
--cc=lucas.demarchi@profusion.mobi \
--cc=paulus@samba.org \
--cc=rjw@sisk.pl \
--cc=serge.hallyn@canonical.com \
--cc=torvalds@linux-foundation.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.