Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1255678 > unrolled thread

[PATCH] w1: w1_process() is not freezable kthread

Started byJiri Kosina <jikos@kernel.org>
First post2015-10-26 07:00 +0100
Last post2015-10-28 06:30 +0100
Articles 3 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] w1: w1_process() is not freezable kthread Jiri Kosina <jikos@kernel.org> - 2015-10-26 07:00 +0100
    Re: [PATCH] w1: w1_process() is not freezable kthread Evgeniy Polyakov <zbr@ioremap.net> - 2015-10-27 15:40 +0100
      Re: [PATCH] w1: w1_process() is not freezable kthread Jiri Kosina <jikos@kernel.org> - 2015-10-28 06:30 +0100

#1255678 — [PATCH] w1: w1_process() is not freezable kthread

FromJiri Kosina <jikos@kernel.org>
Date2015-10-26 07:00 +0100
Subject[PATCH] w1: w1_process() is not freezable kthread
Message-ID<qnIZ4-4nx-3@gated-at.bofh.it>
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1256787

FromEvgeniy Polyakov <zbr@ioremap.net>
Date2015-10-27 15:40 +0100
Message-ID<qodzQ-6jT-29@gated-at.bofh.it>
In reply to#1255678
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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1257670

FromJiri Kosina <jikos@kernel.org>
Date2015-10-28 06:30 +0100
Message-ID<qort9-6PV-17@gated-at.bofh.it>
In reply to#1256787
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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web