> Actually, spinlock_t is not suitable. Because spin_unlcok() does NOT imply
> mb(). The subsequent wait_event_timeout()->atomic_read() may leak into the
> critical section.
>
> We can use set_mb(), if we don't want to play with smp_mb() by hand :)
spin_unlock implies a smp_wmb() but yeah, not
On 07/03, Benjamin Herrenschmidt wrote:
>
> On Tue, 2007-06-26 at 00:27 +0200, Rafael J. Wysocki wrote:
> > > > case PM_HIBERNATION_PREPARE:
> > > > case PM_SUSPEND_PREPARE:
> > > > usermodehelper_disabled = 1;
> > > > - return NOTIFY_OK;
> > > > + smp_mb();
On Tuesday, 3 July 2007 15:19, Rafael J. Wysocki wrote:
> On Tuesday, 3 July 2007 07:30, Benjamin Herrenschmidt wrote:
> > On Tue, 2007-06-26 at 00:27 +0200, Rafael J. Wysocki wrote:
> > > > > case PM_HIBERNATION_PREPARE:
> > > > > case PM_SUSPEND_PREPARE:
> > > > >
On Tuesday, 3 July 2007 07:30, Benjamin Herrenschmidt wrote:
> On Tue, 2007-06-26 at 00:27 +0200, Rafael J. Wysocki wrote:
> > > > case PM_HIBERNATION_PREPARE:
> > > > case PM_SUSPEND_PREPARE:
> > > > usermodehelper_disabled = 1;
> > > > - return NOTIFY_OK;
> > > > +
On Tuesday, 3 July 2007 07:30, Benjamin Herrenschmidt wrote:
On Tue, 2007-06-26 at 00:27 +0200, Rafael J. Wysocki wrote:
case PM_HIBERNATION_PREPARE:
case PM_SUSPEND_PREPARE:
usermodehelper_disabled = 1;
- return NOTIFY_OK;
+ smp_mb();
On Tuesday, 3 July 2007 15:19, Rafael J. Wysocki wrote:
On Tuesday, 3 July 2007 07:30, Benjamin Herrenschmidt wrote:
On Tue, 2007-06-26 at 00:27 +0200, Rafael J. Wysocki wrote:
case PM_HIBERNATION_PREPARE:
case PM_SUSPEND_PREPARE:
usermodehelper_disabled = 1;
On 07/03, Benjamin Herrenschmidt wrote:
On Tue, 2007-06-26 at 00:27 +0200, Rafael J. Wysocki wrote:
case PM_HIBERNATION_PREPARE:
case PM_SUSPEND_PREPARE:
usermodehelper_disabled = 1;
- return NOTIFY_OK;
+ smp_mb();
Actually, spinlock_t is not suitable. Because spin_unlcok() does NOT imply
mb(). The subsequent wait_event_timeout()-atomic_read() may leak into the
critical section.
We can use set_mb(), if we don't want to play with smp_mb() by hand :)
spin_unlock implies a smp_wmb() but yeah, not a full
On Tue, 2007-06-26 at 10:48 +0200, Pavel Machek wrote:
> > The problem, as far as I understand it, is that the instructions can
> get
> > reordered if there are no barriers in there.
>
> Are you sure? I thought atomic variables have barrirers built-in.
bzzzt. they don't.
Ben.
-
To
On Tue, 2007-06-26 at 00:27 +0200, Rafael J. Wysocki wrote:
> > > case PM_HIBERNATION_PREPARE:
> > > case PM_SUSPEND_PREPARE:
> > > usermodehelper_disabled = 1;
> > > - return NOTIFY_OK;
> > > + smp_mb();
> >
> > usermodehelper_disabled should be atomic
On Tue, 2007-06-26 at 10:48 +0200, Pavel Machek wrote:
The problem, as far as I understand it, is that the instructions can
get
reordered if there are no barriers in there.
Are you sure? I thought atomic variables have barrirers built-in.
bzzzt. they don't.
Ben.
-
To unsubscribe from
On Tue, 2007-06-26 at 00:27 +0200, Rafael J. Wysocki wrote:
case PM_HIBERNATION_PREPARE:
case PM_SUSPEND_PREPARE:
usermodehelper_disabled = 1;
- return NOTIFY_OK;
+ smp_mb();
usermodehelper_disabled should be atomic variable, too, so we
Hi!
> > > [I hope the ACKs still apply.]
> >
> > Uhuh, not 100% sure.
> >
> > > +static int usermodehelper_disabled;
> > > +
> >
> >
> > ...
> >
> > > case PM_HIBERNATION_PREPARE:
> > > case PM_SUSPEND_PREPARE:
> > > usermodehelper_disabled = 1;
> > > - return
On 06/26, Rafael J. Wysocki wrote:
>
> On Monday, 25 June 2007 23:55, Pavel Machek wrote:
> >
> > > case PM_HIBERNATION_PREPARE:
> > > case PM_SUSPEND_PREPARE:
> > > usermodehelper_disabled = 1;
> > > - return NOTIFY_OK;
> > > + smp_mb();
> >
> >
On Monday, 25. June 2007, Rafael J. Wysocki wrote:
> [I hope the ACKs still apply.]
>
Mine does
> +static void helper_lock(void)
> +{
> + atomic_inc(_helpers);
> + smp_mb__after_atomic_inc();
> +}
> +
> +static void helper_unlock(void)
> +{
> + if
On Monday, 25. June 2007, Rafael J. Wysocki wrote:
[I hope the ACKs still apply.]
Mine does
+static void helper_lock(void)
+{
+ atomic_inc(running_helpers);
+ smp_mb__after_atomic_inc();
+}
+
+static void helper_unlock(void)
+{
+ if
On 06/26, Rafael J. Wysocki wrote:
On Monday, 25 June 2007 23:55, Pavel Machek wrote:
case PM_HIBERNATION_PREPARE:
case PM_SUSPEND_PREPARE:
usermodehelper_disabled = 1;
- return NOTIFY_OK;
+ smp_mb();
usermodehelper_disabled should be atomic
Hi!
[I hope the ACKs still apply.]
Uhuh, not 100% sure.
+static int usermodehelper_disabled;
+
...
case PM_HIBERNATION_PREPARE:
case PM_SUSPEND_PREPARE:
usermodehelper_disabled = 1;
- return NOTIFY_OK;
+ smp_mb();
On Monday, 25 June 2007 23:55, Pavel Machek wrote:
> Hi!
>
> > [I hope the ACKs still apply.]
>
> Uhuh, not 100% sure.
>
> > +static int usermodehelper_disabled;
> > +
>
>
> ...
>
> > case PM_HIBERNATION_PREPARE:
> > case PM_SUSPEND_PREPARE:
> > usermodehelper_disabled =
Hi!
> [I hope the ACKs still apply.]
Uhuh, not 100% sure.
> +static int usermodehelper_disabled;
> +
...
> case PM_HIBERNATION_PREPARE:
> case PM_SUSPEND_PREPARE:
> usermodehelper_disabled = 1;
> - return NOTIFY_OK;
> + smp_mb();
On Tuesday 26 June 2007 07:52:23 Rafael J. Wysocki wrote:
> [I hope the ACKs still apply.]
Mine does :>
Nigel
pgp9gRcYEcqWK.pgp
Description: PGP signature
[I hope the ACKs still apply.]
---
From: Rafael J. Wysocki <[EMAIL PROTECTED]>
At present, if a user mode helper is running while usermodehelper_pm_callback()
is executed, the helper may be frozen and the completion in
call_usermodehelper_exec() won't be completed until user space processes are
On 06/25, Rafael J. Wysocki wrote:
>
> On Monday, 25 June 2007 12:43, Oleg Nesterov wrote:
>
> > Second, call_usermodehelper's path should first increment the counter, and
> > only
> > then check usermodehelper_disabled,
>
> It does this already.
Ah, sorry, I looked at this patch without
On Mon, Jun 25, 2007 at 02:43:32PM +0400, Oleg Nesterov wrote:
> Rafael J. Wysocki wrote:
> >
> > static int usermodehelper_pm_callback(struct notifier_block *nfb,
> > unsigned long action,
> > void *ignored)
> > {
> > +
On Monday, 25 June 2007 12:43, Oleg Nesterov wrote:
> Rafael J. Wysocki wrote:
> >
> > static int usermodehelper_pm_callback(struct notifier_block *nfb,
> > unsigned long action,
> > void *ignored)
> > {
> > + long retval;
Rafael J. Wysocki wrote:
>
> static int usermodehelper_pm_callback(struct notifier_block *nfb,
> unsigned long action,
> void *ignored)
> {
> + long retval;
> +
> switch (action) {
> case
Rafael J. Wysocki wrote:
static int usermodehelper_pm_callback(struct notifier_block *nfb,
unsigned long action,
void *ignored)
{
+ long retval;
+
switch (action) {
case PM_HIBERNATION_PREPARE:
On Monday, 25 June 2007 12:43, Oleg Nesterov wrote:
Rafael J. Wysocki wrote:
static int usermodehelper_pm_callback(struct notifier_block *nfb,
unsigned long action,
void *ignored)
{
+ long retval;
+
On Mon, Jun 25, 2007 at 02:43:32PM +0400, Oleg Nesterov wrote:
Rafael J. Wysocki wrote:
static int usermodehelper_pm_callback(struct notifier_block *nfb,
unsigned long action,
void *ignored)
{
+ long retval;
On 06/25, Rafael J. Wysocki wrote:
On Monday, 25 June 2007 12:43, Oleg Nesterov wrote:
Second, call_usermodehelper's path should first increment the counter, and
only
then check usermodehelper_disabled,
It does this already.
Ah, sorry, I looked at this patch without seeing the
[I hope the ACKs still apply.]
---
From: Rafael J. Wysocki [EMAIL PROTECTED]
At present, if a user mode helper is running while usermodehelper_pm_callback()
is executed, the helper may be frozen and the completion in
call_usermodehelper_exec() won't be completed until user space processes are
On Tuesday 26 June 2007 07:52:23 Rafael J. Wysocki wrote:
[I hope the ACKs still apply.]
Mine does :
Nigel
pgp9gRcYEcqWK.pgp
Description: PGP signature
Hi!
[I hope the ACKs still apply.]
Uhuh, not 100% sure.
+static int usermodehelper_disabled;
+
...
case PM_HIBERNATION_PREPARE:
case PM_SUSPEND_PREPARE:
usermodehelper_disabled = 1;
- return NOTIFY_OK;
+ smp_mb();
On Monday, 25 June 2007 23:55, Pavel Machek wrote:
Hi!
[I hope the ACKs still apply.]
Uhuh, not 100% sure.
+static int usermodehelper_disabled;
+
...
case PM_HIBERNATION_PREPARE:
case PM_SUSPEND_PREPARE:
usermodehelper_disabled = 1;
-
From: Rafael J. Wysocki <[EMAIL PROTECTED]>
At present, if a user mode helper is running while usermodehelper_pm_callback()
is executed, the helper may be frozen and the completion in
call_usermodehelper_exec() won't be completed until user space processes are
thawed. As a result, the freezing
Hi!
> > > > > Special thanks to Uli Luckas <[EMAIL PROTECTED]> for reviewing the
> > > > > previous
> > > > > versions of this patch and for very useful comments.
> > > > ...
> > > > > Reviewed-by: Pavel Machek <[EMAIL PROTECTED]>
> > > >
> > > > Eh, not sure this header is worth anything.
Hi,
On Sunday, 24 June 2007 19:05, Pavel Machek wrote:
> Hi!
>
> > > > Special thanks to Uli Luckas <[EMAIL PROTECTED]> for reviewing the
> > > > previous
> > > > versions of this patch and for very useful comments.
> > > ...
> > > > Reviewed-by: Pavel Machek <[EMAIL PROTECTED]>
> > >
> > >
Hi!
> > > Special thanks to Uli Luckas <[EMAIL PROTECTED]> for reviewing the
> > > previous
> > > versions of this patch and for very useful comments.
> > ...
> > > Reviewed-by: Pavel Machek <[EMAIL PROTECTED]>
> >
> > Eh, not sure this header is worth anything. Sometimes I'm lazy and
> > stop
Hi!
Special thanks to Uli Luckas [EMAIL PROTECTED] for reviewing the
previous
versions of this patch and for very useful comments.
...
Reviewed-by: Pavel Machek [EMAIL PROTECTED]
Eh, not sure this header is worth anything. Sometimes I'm lazy and
stop when I see first
Hi,
On Sunday, 24 June 2007 19:05, Pavel Machek wrote:
Hi!
Special thanks to Uli Luckas [EMAIL PROTECTED] for reviewing the
previous
versions of this patch and for very useful comments.
...
Reviewed-by: Pavel Machek [EMAIL PROTECTED]
Eh, not sure this header is worth
Hi!
Special thanks to Uli Luckas [EMAIL PROTECTED] for reviewing the
previous
versions of this patch and for very useful comments.
...
Reviewed-by: Pavel Machek [EMAIL PROTECTED]
Eh, not sure this header is worth anything. Sometimes I'm lazy and
stop when I
From: Rafael J. Wysocki [EMAIL PROTECTED]
At present, if a user mode helper is running while usermodehelper_pm_callback()
is executed, the helper may be frozen and the completion in
call_usermodehelper_exec() won't be completed until user space processes are
thawed. As a result, the freezing of
On Friday, 22 June 2007 23:07, Pavel Machek wrote:
> Hi!
>
> > From: Rafael J. Wysocki <[EMAIL PROTECTED]>
> >
> > At present, if a user mode helper is running while
> > usermodehelper_pm_callback()
> > is executed, the helper may be frozen and the completion in
> > call_usermodehelper_exec()
Hi!
> From: Rafael J. Wysocki <[EMAIL PROTECTED]>
>
> At present, if a user mode helper is running while
> usermodehelper_pm_callback()
> is executed, the helper may be frozen and the completion in
> call_usermodehelper_exec() won't be completed until user space processes are
> thawed. As a
From: Rafael J. Wysocki <[EMAIL PROTECTED]>
At present, if a user mode helper is running while usermodehelper_pm_callback()
is executed, the helper may be frozen and the completion in
call_usermodehelper_exec() won't be completed until user space processes are
thawed. As a result, the freezing
From: Rafael J. Wysocki [EMAIL PROTECTED]
At present, if a user mode helper is running while usermodehelper_pm_callback()
is executed, the helper may be frozen and the completion in
call_usermodehelper_exec() won't be completed until user space processes are
thawed. As a result, the freezing of
Hi!
From: Rafael J. Wysocki [EMAIL PROTECTED]
At present, if a user mode helper is running while
usermodehelper_pm_callback()
is executed, the helper may be frozen and the completion in
call_usermodehelper_exec() won't be completed until user space processes are
thawed. As a result, the
On Friday, 22 June 2007 23:07, Pavel Machek wrote:
Hi!
From: Rafael J. Wysocki [EMAIL PROTECTED]
At present, if a user mode helper is running while
usermodehelper_pm_callback()
is executed, the helper may be frozen and the completion in
call_usermodehelper_exec() won't be
On Thursday, 21 June 2007 15:30, Pavel Machek wrote:
> Hi!
>
> > From: Rafael J. Wysocki <[EMAIL PROTECTED]>
> >
> > At present, if a user mode helper is running while
> > usermodehelper_pm_callback()
> > is executed, the helper may be frozen and the completion in
> > call_usermodehelper_exec()
Hi!
> From: Rafael J. Wysocki <[EMAIL PROTECTED]>
>
> At present, if a user mode helper is running while
> usermodehelper_pm_callback()
> is executed, the helper may be frozen and the completion in
> call_usermodehelper_exec() won't be completed until user space processes are
> thawed. As a
Hi!
From: Rafael J. Wysocki [EMAIL PROTECTED]
At present, if a user mode helper is running while
usermodehelper_pm_callback()
is executed, the helper may be frozen and the completion in
call_usermodehelper_exec() won't be completed until user space processes are
thawed. As a result, the
On Thursday, 21 June 2007 15:30, Pavel Machek wrote:
Hi!
From: Rafael J. Wysocki [EMAIL PROTECTED]
At present, if a user mode helper is running while
usermodehelper_pm_callback()
is executed, the helper may be frozen and the completion in
call_usermodehelper_exec() won't be
On Monday, 18. June 2007, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <[EMAIL PROTECTED]>
>
> At present, if a user mode helper is running while
> usermodehelper_pm_callback() is executed, the helper may be frozen and the
> completion in
> call_usermodehelper_exec() won't be completed until
On Monday, 18. June 2007, Rafael J. Wysocki wrote:
From: Rafael J. Wysocki [EMAIL PROTECTED]
At present, if a user mode helper is running while
usermodehelper_pm_callback() is executed, the helper may be frozen and the
completion in
call_usermodehelper_exec() won't be completed until user
Hi.
On Tuesday 19 June 2007 07:29:58 Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <[EMAIL PROTECTED]>
>
> At present, if a user mode helper is running while
usermodehelper_pm_callback()
> is executed, the helper may be frozen and the completion in
> call_usermodehelper_exec() won't be
From: Rafael J. Wysocki <[EMAIL PROTECTED]>
At present, if a user mode helper is running while usermodehelper_pm_callback()
is executed, the helper may be frozen and the completion in
call_usermodehelper_exec() won't be completed until user space processes are
thawed. As a result, the freezing
From: Rafael J. Wysocki [EMAIL PROTECTED]
At present, if a user mode helper is running while usermodehelper_pm_callback()
is executed, the helper may be frozen and the completion in
call_usermodehelper_exec() won't be completed until user space processes are
thawed. As a result, the freezing of
Hi.
On Tuesday 19 June 2007 07:29:58 Rafael J. Wysocki wrote:
From: Rafael J. Wysocki [EMAIL PROTECTED]
At present, if a user mode helper is running while
usermodehelper_pm_callback()
is executed, the helper may be frozen and the completion in
call_usermodehelper_exec() won't be completed
58 matches
Mail list logo