[Linux-ha-dev] Root cause for machine lockups in CVS head version

Zhu, Yi yi.zhu at intel.com
Tue Jan 6 22:44:16 MST 2004


On Wed, 7 Jan 2004, Alan Robertson wrote:

> This makes perfect sense to me.
> 
> Have you thought about putting a call to cl_shortsleep() in the code
> before it loops again?

I tried the cl_shortsleep(), it works. I think it's a good idea!
One thing I don't quite understand is from the nanosleep man page:

" If the process is scheduled under a  real-time policy like
SCHED_FIFO or SCHED_RR, then pauses of up to 2 ms will be performed
as busy waits with microsecond precision"

Does this mean it is possible not to put the process to the waiting
queue by the kernel if the sleep time is less than 2 ms (like 0)?

The patch with cl_shortsleep:

--- lib/clplumbing/ipcsocket.c.old      2003-12-30 13:11:29.000000000 +0800
+++ lib/clplumbing/ipcsocket.c  2004-01-07 07:27:39.565542576 +0800
@@ -634,6 +634,7 @@
                                case EAGAIN:
                                        if (conn_info->remaining_data > 0)
{
                                                *started = TRUE;
+                                               cl_shortsleep();
                                        }
                                        break;
 
Thanks,
-yi

> --
>      Alan Robertson <alanr at unix.sh>
> 
> "Openness is the foundation and preservative of friendship...  Let me
> claim
> from you at all times your undisguised opinions." - William Wilberforce



More information about the Linux-HA-Dev mailing list