linux-um archives
 help / color / mirror / Atom feed
* [uml-devel] [-mm PATCH 14/32] um: fix-up schedule_timeout() usage
       [not found] <20050815180514.GC2854@us.ibm.com>
@ 2005-08-15 18:16 ` Nishanth Aravamudan
  2005-08-15 18:54   ` Jeff Dike
  0 siblings, 1 reply; 2+ messages in thread
From: Nishanth Aravamudan @ 2005-08-15 18:16 UTC (permalink / raw)
  To: jdike; +Cc: akpm, user-mode-linux-devel

Description: Use schedule_timeout_interruptible() instead of
set_current_state()/schedule_timeout() to reduce kernel size.

Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>

---

 arch/um/drivers/random.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff -urpN 2.6.13-rc5-mm1/arch/um/drivers/random.c 2.6.13-rc5-mm1-dev/arch/um/drivers/random.c
--- 2.6.13-rc5-mm1/arch/um/drivers/random.c	2005-08-07 09:57:22.000000000 -0700
+++ 2.6.13-rc5-mm1-dev/arch/um/drivers/random.c	2005-08-08 13:55:26.000000000 -0700
@@ -58,10 +58,8 @@ static ssize_t rng_dev_read (struct file
                         if (filp->f_flags & O_NONBLOCK)
                                 return ret ? : -EAGAIN;
 
-                        if(need_resched()){
-                                current->state = TASK_INTERRUPTIBLE;
-                                schedule_timeout(1);
-                        }
+                        if(need_resched())
+                                schedule_timeout_interruptible(1);
                 }
                 else return n;
 		if (signal_pending (current))


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

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

* Re: [uml-devel] [-mm PATCH 14/32] um: fix-up schedule_timeout() usage
  2005-08-15 18:16 ` [uml-devel] [-mm PATCH 14/32] um: fix-up schedule_timeout() usage Nishanth Aravamudan
@ 2005-08-15 18:54   ` Jeff Dike
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Dike @ 2005-08-15 18:54 UTC (permalink / raw)
  To: Nishanth Aravamudan; +Cc: akpm, user-mode-linux-devel

On Mon, Aug 15, 2005 at 11:16:26AM -0700, Nishanth Aravamudan wrote:
> Description: Use schedule_timeout_interruptible() instead of
> set_current_state()/schedule_timeout() to reduce kernel size.
> 
> Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>

Acked-by: Jeff Dike <jdike@addtoit.com>


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

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

end of thread, other threads:[~2005-08-15 19:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20050815180514.GC2854@us.ibm.com>
2005-08-15 18:16 ` [uml-devel] [-mm PATCH 14/32] um: fix-up schedule_timeout() usage Nishanth Aravamudan
2005-08-15 18:54   ` Jeff Dike

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox