mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nigel Cunningham <ncunningham@cyclades.com>
To: Pavel Machek <pavel@suse.cz>
Cc: dtor_core@ameritech.net,
	Linux-pm mailing list <linux-pm@lists.osdl.org>,
	Vojtech Pavlik <vojtech@suse.cz>, Stefan Seyfried <seife@suse.de>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Andy Isaacson <adi@hexapodia.org>
Subject: Re: [linux-pm] Re: swsusp 'disk' fails in bk-current - intel_agp at fault?
Date: Wed, 30 Mar 2005 09:46:26 +1000	[thread overview]
Message-ID: <1112139986.29392.26.camel@desktop.cunningham.myip.net.au> (raw)
In-Reply-To: <20050329223519.GI8125@elf.ucw.cz>

Hi.

On Wed, 2005-03-30 at 08:35, Pavel Machek wrote:
> Hi!
> 
> > > We currently freeze processes for suspend-to-ram, too. I guess that
> > > disable_usermodehelper is probably better and that in_suspend() should
> > > only be used for sanity checks... go with disable_usermodehelper and
> > > sorry for the noise.
> > 
> > Here's another possibility: Freeze the workqueue that
> > call_usermodehelper uses (remember that code I didn't push hard enough
> > to Andrew?), and let invocations of call_usermodehelper block in
> > TASK_UNINTERRUPTIBLE. In refrigerating processes, don't choke on
> 
> There may be many devices in the system, and you are going to need
> quite a lot of RAM for all that... That's why they do not queue it
> during boot, IIRC. Disabling usermode helper seems right.

Many devices is true, but very few of them invoke usermode helpers.

[desktop build-2.6.12-rc1]# find -name *.[ch] | xargs grep usermodehelper
./drivers/s390/crypto/z90main.c:        call_usermodehelper(argv[0], argv, envp, 0);
./drivers/net/hamradio/baycom_epp.c:    return call_usermodehelper(eppconfig_path, argv, envp, 1);
./drivers/acpi/thermal.c:       call_usermodehelper(argv[0], argv, envp, 0);
./drivers/acpi/thermal.mod.c:   { 0x436006da, "call_usermodehelper" },
./drivers/input/input.c:        value = call_usermodehelper(argv [0], argv, envp, 0);
./drivers/pnp/pnpbios/core.c:   value = call_usermodehelper (argv [0], argv, envp, 0);
./drivers/macintosh/therm_pm72.c:       return call_usermodehelper(critical_overtemp_path, argv, envp, 0);
./arch/i386/mach-voyager/voyager_thread.c:      if ((ret = call_usermodehelper(argv[0], argv, envp, 1)) != 0) {
./include/linux/kmod.h:extern int call_usermodehelper(char *path, char *argv[], char *envp[], int wait);
./include/linux/kmod.h:extern void usermodehelper_init(void);
./kernel/power/main.c:  return call_usermodehelper(argv[0], argv, envp, 1);
./kernel/power/suspend_userui.c:        retval = call_usermodehelper(userui_program, argv, envp, 0);
./kernel/kmod.c:        call_usermodehelper wait flag, and remove exec_usermodehelper.
./kernel/kmod.c:        ret = call_usermodehelper(modprobe_path, argv, envp, 1);
./kernel/kmod.c:static int ____call_usermodehelper(void *data)
./kernel/kmod.c:        pid = kernel_thread(____call_usermodehelper, sub_info, SIGCHLD);
./kernel/kmod.c:static void __call_usermodehelper(void *data)
./kernel/kmod.c:                pid = kernel_thread(____call_usermodehelper, sub_info,
./kernel/kmod.c: * call_usermodehelper - start a usermode application
./kernel/kmod.c:int call_usermodehelper(char *path, char **argv, char **envp, int wait)
./kernel/kmod.c:        DECLARE_WORK(work, __call_usermodehelper, &sub_info);
./kernel/kmod.c:EXPORT_SYMBOL(call_usermodehelper);
./kernel/kmod.c:void __init usermodehelper_init(void)
./kernel/cpuset.c: * Note final arg to call_usermodehelper() is 0 - that means
./kernel/cpuset.c:      return call_usermodehelper(argv[0], argv, envp, 0);
./security/keys/request_key.c:  return call_usermodehelper(argv[0], argv, envp, 1);
./lib/kobject_uevent.c: retval = call_usermodehelper (argv[0], argv, envp, 0);
./lib/kobject_uevent.c:         pr_debug ("%s - call_usermodehelper returned %d\n",
./init/main.c:  usermodehelper_init();

Of course there will be indirect invocations (via kobjects, for
example), but I still think the number is not that great. I'm already
using the method I suggested in unreleased Suspend2 code, and the only
invocation I'm catch is at resume time, for the keseriod.

Regards,

Nigel
-- 
Nigel Cunningham
Software Engineer, Canberra, Australia
http://www.cyclades.com
Bus: +61 (2) 6291 9554; Hme: +61 (2) 6292 8028;  Mob: +61 (417) 100 574

Maintainer of Suspend2 Kernel Patches http://suspend2.net


  reply	other threads:[~2005-03-29 23:46 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-23 18:49 Andy Isaacson
2005-03-24 14:27 ` Stefan Seyfried
2005-03-24 18:10   ` Andy Isaacson
2005-03-24 19:18     ` Dmitry Torokhov
2005-03-24 20:20       ` Andy Isaacson
2005-03-24 21:10         ` Dmitry Torokhov
2005-03-24 23:54           ` Andy Isaacson
2005-03-25  9:22             ` Stefan Seyfried
2005-03-25 10:13               ` Pavel Machek
2005-03-25 14:19                 ` Dmitry Torokhov
2005-03-25 14:24                   ` Pavel Machek
2005-03-25 14:52                     ` Dmitry Torokhov
2005-03-25 15:42                       ` Pavel Machek
2005-03-25 16:04                         ` Dmitry Torokhov
2005-03-28 23:00                           ` Pavel Machek
2005-03-29 23:19                           ` Rafael J. Wysocki
2005-03-29 21:49                       ` Rafael J. Wysocki
2005-03-25 18:36                 ` Andy Isaacson
2005-03-29 16:18               ` Dmitry Torokhov
2005-03-29 18:18                 ` Pavel Machek
2005-03-29 19:11                   ` Dmitry Torokhov
2005-03-29 19:23                     ` Pavel Machek
2005-03-29 20:05                       ` Dmitry Torokhov
2005-03-29 20:52                         ` Pavel Machek
2005-03-29 21:07                           ` Dmitry Torokhov
2005-03-29 21:12                             ` Pavel Machek
2005-03-29 21:33                               ` Dmitry Torokhov
2005-03-29 21:44                                 ` Pavel Machek
2005-03-29 22:31                                   ` [linux-pm] " Nigel Cunningham
2005-03-29 22:35                                     ` Pavel Machek
2005-03-29 23:46                                       ` Nigel Cunningham [this message]
2005-03-31  7:26                                       ` Dmitry Torokhov
2005-03-31  8:39                                         ` Pavel Machek
2005-03-31 15:02                                           ` Dmitry Torokhov
2005-03-31 16:02                                         ` Patrick Mochel
2005-03-31 16:32                                           ` Dmitry Torokhov
2005-03-31 22:16                                             ` Nigel Cunningham
2005-03-31 22:18                                             ` Pavel Machek
2005-03-31 22:28                                               ` Nigel Cunningham
2005-04-01  8:49                                                 ` Rafael J. Wysocki
2005-04-01 10:33                                                   ` Stefan Seyfried
2005-03-29 23:05                               ` Rafael J. Wysocki
2005-03-29 21:23                           ` [linux-pm] " Patrick Mochel
2005-03-29 21:38                             ` Dmitry Torokhov
2005-03-30  9:52                             ` Greg KH
2005-03-25 14:58             ` Dmitry Torokhov
2005-03-30  7:26               ` Andy Isaacson
2005-03-24 21:14         ` Dmitry Torokhov
2005-03-24 20:38     ` Stefan Seyfried
2005-03-29 18:42       ` Dmitry Torokhov
2005-03-30  7:24         ` Andy Isaacson
     [not found] ` <20050525171825.51a06908.akpm@osdl.org>
2005-05-27 17:44   ` Andy Isaacson

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=1112139986.29392.26.camel@desktop.cunningham.myip.net.au \
    --to=ncunningham@cyclades.com \
    --cc=adi@hexapodia.org \
    --cc=dtor_core@ameritech.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@lists.osdl.org \
    --cc=pavel@suse.cz \
    --cc=seife@suse.de \
    --cc=vojtech@suse.cz \
    /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

all inboxes | Powered by JetHome®