* wait_for_completion API extension addition @ 2005-01-25 20:22 Mike Waychison 2005-01-25 20:30 ` Thomas Gleixner 2005-01-25 21:01 ` Ingo Molnar 0 siblings, 2 replies; 5+ messages in thread From: Mike Waychison @ 2005-01-25 20:22 UTC (permalink / raw) To: Ingo Molnar; +Cc: Thomas Gleixner, Andrew Morton, Linus Torvalds, Linux kernel -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Ingo, I noticed that the wait_for_completion API extensions made it into mainline. However, I posted that the patch in question is broken a while back: http://marc.theaimsgroup.com/?l=linux-kernel&m=110131832828126&w=2 Can we fix this? Thanks, - -- Mike Waychison Sun Microsystems, Inc. 1 (650) 352-5299 voice 1 (416) 202-8336 voice ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ NOTICE: The opinions expressed in this email are held by me, and may not represent the views of Sun Microsystems, Inc. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFB9qqDdQs4kOxk3/MRAnKmAJ4oAfPDj7fQrljahvQKWsOMGq7F2wCcDyMI oLJAXgNbAyhJEC0DFfozn0M= =dbKU -----END PGP SIGNATURE----- ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: wait_for_completion API extension addition 2005-01-25 20:22 wait_for_completion API extension addition Mike Waychison @ 2005-01-25 20:30 ` Thomas Gleixner 2005-01-25 20:41 ` Mike Waychison 2005-01-25 21:01 ` Ingo Molnar 1 sibling, 1 reply; 5+ messages in thread From: Thomas Gleixner @ 2005-01-25 20:30 UTC (permalink / raw) To: Mike Waychison; +Cc: Ingo Molnar, Andrew Morton, Linus Torvalds, Linux kernel On Tue, 2005-01-25 at 15:22 -0500, Mike Waychison wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hi Ingo, > > I noticed that the wait_for_completion API extensions made it into mainline. > > However, I posted that the patch in question is broken a while back: > > http://marc.theaimsgroup.com/?l=linux-kernel&m=110131832828126&w=2 > > Can we fix this? We reposted a fixed version. It should not be the one from October which made it upstream. tglx ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: wait_for_completion API extension addition 2005-01-25 20:30 ` Thomas Gleixner @ 2005-01-25 20:41 ` Mike Waychison 0 siblings, 0 replies; 5+ messages in thread From: Mike Waychison @ 2005-01-25 20:41 UTC (permalink / raw) To: tglx; +Cc: Ingo Molnar, Andrew Morton, Linus Torvalds, Linux kernel -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Thomas Gleixner wrote: > On Tue, 2005-01-25 at 15:22 -0500, Mike Waychison wrote: > >>-----BEGIN PGP SIGNED MESSAGE----- >>Hash: SHA1 >> >>Hi Ingo, >> >>I noticed that the wait_for_completion API extensions made it into mainline. >> >>However, I posted that the patch in question is broken a while back: >> >>http://marc.theaimsgroup.com/?l=linux-kernel&m=110131832828126&w=2 >> >>Can we fix this? > > > We reposted a fixed version. It should not be the one from October which > made it upstream. > Well, according to linux.bkbits.net/linux-2.5, it appears to have gotten the broken version :( - -- Mike Waychison Sun Microsystems, Inc. 1 (650) 352-5299 voice 1 (416) 202-8336 voice ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ NOTICE: The opinions expressed in this email are held by me, and may not represent the views of Sun Microsystems, Inc. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFB9q7odQs4kOxk3/MRAhUbAJ9jhpFbrpqi2K+lakwy9mpdwiq/3QCdHovv 16kp8J0NENFAKS/QCq6B1x4= =NjNB -----END PGP SIGNATURE----- ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: wait_for_completion API extension addition 2005-01-25 20:22 wait_for_completion API extension addition Mike Waychison 2005-01-25 20:30 ` Thomas Gleixner @ 2005-01-25 21:01 ` Ingo Molnar 2005-01-25 23:47 ` Mike Waychison 1 sibling, 1 reply; 5+ messages in thread From: Ingo Molnar @ 2005-01-25 21:01 UTC (permalink / raw) To: Mike Waychison Cc: Thomas Gleixner, Andrew Morton, Linus Torvalds, Linux kernel * Mike Waychison <Michael.Waychison@Sun.COM> wrote: > Hi Ingo, > > I noticed that the wait_for_completion API extensions made it into > mainline. > > However, I posted that the patch in question is broken a while back: > > http://marc.theaimsgroup.com/?l=linux-kernel&m=110131832828126&w=2 > > Can we fix this? (/me pokes himself in the eyes) could you send an incremental patch against BK-curr? Ingo ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: wait_for_completion API extension addition 2005-01-25 21:01 ` Ingo Molnar @ 2005-01-25 23:47 ` Mike Waychison 0 siblings, 0 replies; 5+ messages in thread From: Mike Waychison @ 2005-01-25 23:47 UTC (permalink / raw) To: Ingo Molnar; +Cc: Thomas Gleixner, Andrew Morton, Linus Torvalds, Linux kernel [-- Attachment #1: Type: text/plain, Size: 1103 bytes --] -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Ingo Molnar wrote: > * Mike Waychison <Michael.Waychison@Sun.COM> wrote: > > >>Hi Ingo, >> >>I noticed that the wait_for_completion API extensions made it into >>mainline. >> >>However, I posted that the patch in question is broken a while back: >> >>http://marc.theaimsgroup.com/?l=linux-kernel&m=110131832828126&w=2 >> >>Can we fix this? > > > (/me pokes himself in the eyes) > > could you send an incremental patch against BK-curr? > > Ingo Attached. - -- Mike Waychison Sun Microsystems, Inc. 1 (650) 352-5299 voice 1 (416) 202-8336 voice ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ NOTICE: The opinions expressed in this email are held by me, and may not represent the views of Sun Microsystems, Inc. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFB9tpBdQs4kOxk3/MRArUtAJ4+O7CCH8HdGqeREJb7yVQjOdJSkQCfRTIX al9JVahdnQcOJIwyIW3LeDU= =zhk+ -----END PGP SIGNATURE----- [-- Attachment #2: fix_completion_api.patch --] [-- Type: text/x-patch, Size: 2039 bytes --] Fix up signal_pending and timeout paths for wait_for_completion API extensions. Signed-off-by: Mike Waychison <michael.waychison@sun.com> --- sched.c | 21 +++++++++++++-------- 1 files changed, 13 insertions(+), 8 deletions(-) Index: linux-2.6-bk-curr/kernel/sched.c =================================================================== --- linux-2.6-bk-curr.orig/kernel/sched.c 2005-01-25 18:22:04.667957792 -0500 +++ linux-2.6-bk-curr/kernel/sched.c 2005-01-25 18:38:54.421451928 -0500 @@ -3020,15 +3020,17 @@ wait_for_completion_timeout(struct compl __set_current_state(TASK_UNINTERRUPTIBLE); spin_unlock_irq(&x->wait.lock); timeout = schedule_timeout(timeout); - if (!timeout) - goto out; spin_lock_irq(&x->wait.lock); + if (!timeout) { + __remove_wait_queue(&x->wait, &wait); + goto out; + } } while (!x->done); __remove_wait_queue(&x->wait, &wait); } x->done--; - spin_unlock_irq(&x->wait.lock); out: + spin_unlock_irq(&x->wait.lock); return timeout; } EXPORT_SYMBOL(wait_for_completion_timeout); @@ -3048,6 +3050,7 @@ int fastcall __sched wait_for_completion do { if (signal_pending(current)) { ret = -ERESTARTSYS; + __remove_wait_queue(&x->wait, &wait); goto out; } __set_current_state(TASK_INTERRUPTIBLE); @@ -3080,21 +3083,23 @@ wait_for_completion_interruptible_timeou do { if (signal_pending(current)) { timeout = -ERESTARTSYS; - goto out_unlock; + __remove_wait_queue(&x->wait, &wait); + goto out; } __set_current_state(TASK_INTERRUPTIBLE); spin_unlock_irq(&x->wait.lock); timeout = schedule_timeout(timeout); - if (!timeout) - goto out; spin_lock_irq(&x->wait.lock); + if (!timeout) { + __remove_wait_queue(&x->wait, &wait); + goto out; + } } while (!x->done); __remove_wait_queue(&x->wait, &wait); } x->done--; -out_unlock: - spin_unlock_irq(&x->wait.lock); out: + spin_unlock_irq(&x->wait.lock); return timeout; } EXPORT_SYMBOL(wait_for_completion_interruptible_timeout); ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2005-01-25 23:54 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2005-01-25 20:22 wait_for_completion API extension addition Mike Waychison 2005-01-25 20:30 ` Thomas Gleixner 2005-01-25 20:41 ` Mike Waychison 2005-01-25 21:01 ` Ingo Molnar 2005-01-25 23:47 ` Mike Waychison
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox