All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] w1: w1_process() is not freezable kthread
@ 2015-10-26  5:53 Jiri Kosina
  2015-10-27 14:30 ` Evgeniy Polyakov
  0 siblings, 1 reply; 8+ messages in thread
From: Jiri Kosina @ 2015-10-26  5:53 UTC (permalink / raw)
  To: Evgeniy Polyakov; +Cc: linux-kernel

From: Jiri Kosina <jkosina@suse.cz>

w1_process() calls try_to_freeze(), but the thread doesn't mark itself 
freezable through set_freezable(), so the try_to_freeze() call is useless.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
---
 drivers/w1/w1.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/w1/w1.c b/drivers/w1/w1.c
index c9a7ff6..89a7847 100644
--- a/drivers/w1/w1.c
+++ b/drivers/w1/w1.c
@@ -1147,7 +1147,6 @@ int w1_process(void *data)
 			jremain = 1;
 		}
 
-		try_to_freeze();
 		__set_current_state(TASK_INTERRUPTIBLE);
 
 		/* hold list_mutex until after interruptible to prevent loosing
-- 
2.1.2


-- 
Jiri Kosina
SUSE Labs

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] w1: w1_process() is not freezable kthread
  2015-10-26  5:53 [PATCH] w1: w1_process() is not freezable kthread Jiri Kosina
@ 2015-10-27 14:30 ` Evgeniy Polyakov
  2015-10-28  5:26   ` Jiri Kosina
  0 siblings, 1 reply; 8+ messages in thread
From: Evgeniy Polyakov @ 2015-10-27 14:30 UTC (permalink / raw)
  To: Jiri Kosina; +Cc: linux-kernel, GregKH

Hi

26.10.2015, 08:53, "Jiri Kosina" <jikos@kernel.org>:
> From: Jiri Kosina <jkosina@suse.cz>
>
> w1_process() calls try_to_freeze(), but the thread doesn't mark itself
> freezable through set_freezable(), so the try_to_freeze() call is useless.

I believe it is better to mark it freezable, what do you think?
Its task is useless if anyone else goes sleeping, it should freeze too.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] w1: w1_process() is not freezable kthread
  2015-10-27 14:30 ` Evgeniy Polyakov
@ 2015-10-28  5:26   ` Jiri Kosina
  2015-11-05 13:33     ` Evgeniy Polyakov
  0 siblings, 1 reply; 8+ messages in thread
From: Jiri Kosina @ 2015-10-28  5:26 UTC (permalink / raw)
  To: Evgeniy Polyakov; +Cc: linux-kernel, GregKH

On Tue, 27 Oct 2015, Evgeniy Polyakov wrote:

> > w1_process() calls try_to_freeze(), but the thread doesn't mark itself
> > freezable through set_freezable(), so the try_to_freeze() call is useless.
> 
> I believe it is better to mark it freezable, what do you think? Its task 
> is useless if anyone else goes sleeping, it should freeze too.

I fail to see why this kthread should be freezable at all. There is no way 
for w1 device to generate new I/O requests that should be written out to 
filesystem, is it?

Thanks,

-- 
Jiri Kosina
SUSE Labs


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] w1: w1_process() is not freezable kthread
  2015-10-28  5:26   ` Jiri Kosina
@ 2015-11-05 13:33     ` Evgeniy Polyakov
  2015-11-19 15:49       ` Jiri Kosina
  0 siblings, 1 reply; 8+ messages in thread
From: Evgeniy Polyakov @ 2015-11-05 13:33 UTC (permalink / raw)
  To: Jiri Kosina; +Cc: linux-kernel, GregKH

Hi

28.10.2015, 08:26, "Jiri Kosina" <jikos@kernel.org>:
> On Tue, 27 Oct 2015, Evgeniy Polyakov wrote:
>
>>  > w1_process() calls try_to_freeze(), but the thread doesn't mark itself
>>  > freezable through set_freezable(), so the try_to_freeze() call is useless.
>>
>>  I believe it is better to mark it freezable, what do you think? Its task
>>  is useless if anyone else goes sleeping, it should freeze too.
>
> I fail to see why this kthread should be freezable at all. There is no way
> for w1 device to generate new I/O requests that should be written out to
> filesystem, is it?

w1 doesn't generate such requests, but it was more to make this thread
consistent with majority of other threads in the kernel.

Ok, I'm not against it, Greg please pull this patch into your tree.

Acked-by: Evgeniy Polyakov <zbr@ioremap.net>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] w1: w1_process() is not freezable kthread
  2015-11-05 13:33     ` Evgeniy Polyakov
@ 2015-11-19 15:49       ` Jiri Kosina
  2015-11-19 16:15         ` GregKH
  2016-02-08  5:31         ` GregKH
  0 siblings, 2 replies; 8+ messages in thread
From: Jiri Kosina @ 2015-11-19 15:49 UTC (permalink / raw)
  To: Evgeniy Polyakov; +Cc: linux-kernel, GregKH

On Thu, 5 Nov 2015, Evgeniy Polyakov wrote:

> > I fail to see why this kthread should be freezable at all. There is no way
> > for w1 device to generate new I/O requests that should be written out to
> > filesystem, is it?
> 
> w1 doesn't generate such requests, but it was more to make this thread
> consistent with majority of other threads in the kernel.

Most of which actually don't need freezer at all, and only contribute to 
the overall confusion regarding what kthread freezer is actually for.

It's my long-term goal to fix this situation (and this patch is part of 
some preparatory steps :) ).

> Ok, I'm not against it, Greg please pull this patch into your tree.
> 
> Acked-by: Evgeniy Polyakov <zbr@ioremap.net>

Greg, do you plan to take this please? I don't seem to see it in 
linux-next as of today.

Thanks,

-- 
Jiri Kosina
SUSE Labs


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] w1: w1_process() is not freezable kthread
  2015-11-19 15:49       ` Jiri Kosina
@ 2015-11-19 16:15         ` GregKH
  2016-02-08  5:31         ` GregKH
  1 sibling, 0 replies; 8+ messages in thread
From: GregKH @ 2015-11-19 16:15 UTC (permalink / raw)
  To: Jiri Kosina; +Cc: Evgeniy Polyakov, linux-kernel

On Thu, Nov 19, 2015 at 04:49:41PM +0100, Jiri Kosina wrote:
> On Thu, 5 Nov 2015, Evgeniy Polyakov wrote:
> 
> > > I fail to see why this kthread should be freezable at all. There is no way
> > > for w1 device to generate new I/O requests that should be written out to
> > > filesystem, is it?
> > 
> > w1 doesn't generate such requests, but it was more to make this thread
> > consistent with majority of other threads in the kernel.
> 
> Most of which actually don't need freezer at all, and only contribute to 
> the overall confusion regarding what kthread freezer is actually for.
> 
> It's my long-term goal to fix this situation (and this patch is part of 
> some preparatory steps :) ).
> 
> > Ok, I'm not against it, Greg please pull this patch into your tree.
> > 
> > Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
> 
> Greg, do you plan to take this please? I don't seem to see it in 
> linux-next as of today.

Give me a chance to catch up on things, the merge window was just over
and I just returned from another conference...

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] w1: w1_process() is not freezable kthread
  2015-11-19 15:49       ` Jiri Kosina
  2015-11-19 16:15         ` GregKH
@ 2016-02-08  5:31         ` GregKH
  2016-02-10 10:41           ` Jiri Kosina
  1 sibling, 1 reply; 8+ messages in thread
From: GregKH @ 2016-02-08  5:31 UTC (permalink / raw)
  To: Jiri Kosina; +Cc: Evgeniy Polyakov, linux-kernel

On Thu, Nov 19, 2015 at 04:49:41PM +0100, Jiri Kosina wrote:
> On Thu, 5 Nov 2015, Evgeniy Polyakov wrote:
> 
> > > I fail to see why this kthread should be freezable at all. There is no way
> > > for w1 device to generate new I/O requests that should be written out to
> > > filesystem, is it?
> > 
> > w1 doesn't generate such requests, but it was more to make this thread
> > consistent with majority of other threads in the kernel.
> 
> Most of which actually don't need freezer at all, and only contribute to 
> the overall confusion regarding what kthread freezer is actually for.
> 
> It's my long-term goal to fix this situation (and this patch is part of 
> some preparatory steps :) ).
> 
> > Ok, I'm not against it, Greg please pull this patch into your tree.
> > 
> > Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
> 
> Greg, do you plan to take this please? I don't seem to see it in 
> linux-next as of today.

I can't find this patch anywhere in my queue, can you please resend it
to me with the ack so I can apply it?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] w1: w1_process() is not freezable kthread
  2016-02-08  5:31         ` GregKH
@ 2016-02-10 10:41           ` Jiri Kosina
  0 siblings, 0 replies; 8+ messages in thread
From: Jiri Kosina @ 2016-02-10 10:41 UTC (permalink / raw)
  To: GregKH; +Cc: Evgeniy Polyakov, linux-kernel

On Sun, 7 Feb 2016, GregKH wrote:

> I can't find this patch anywhere in my queue, can you please resend it
> to me with the ack so I can apply it?

Greg, please find it below. Thanks.





From: Jiri Kosina <jkosina@suse.cz>
Subject: [PATCH] w1: w1_process() is not freezable kthread

From: Jiri Kosina <jkosina@suse.cz>

w1_process() calls try_to_freeze(), but the thread doesn't mark itself 
freezable through set_freezable(), so the try_to_freeze() call is useless.

Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
---
 drivers/w1/w1.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/w1/w1.c b/drivers/w1/w1.c
index c9a7ff6..89a7847 100644
--- a/drivers/w1/w1.c
+++ b/drivers/w1/w1.c
@@ -1147,7 +1147,6 @@ int w1_process(void *data)
 			jremain = 1;
 		}
 
-		try_to_freeze();
 		__set_current_state(TASK_INTERRUPTIBLE);
 
 		/* hold list_mutex until after interruptible to prevent loosing
-- 
Jiri Kosina
SUSE Labs

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-02-10 10:41 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-26  5:53 [PATCH] w1: w1_process() is not freezable kthread Jiri Kosina
2015-10-27 14:30 ` Evgeniy Polyakov
2015-10-28  5:26   ` Jiri Kosina
2015-11-05 13:33     ` Evgeniy Polyakov
2015-11-19 15:49       ` Jiri Kosina
2015-11-19 16:15         ` GregKH
2016-02-08  5:31         ` GregKH
2016-02-10 10:41           ` Jiri Kosina

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.