On Thu, 12 Feb 2004, jw schultz wrote: > Try this patch which adds an arbitrary 100ms back-off delay > to hopefully give the system a chance to recover.
There should be some counting done - if rsync ends up banging too often against ENOBUFS it might get in the crosshairs of the OOM killer. Maybe we might want to even consider a sync() call after a number of ENOBUFS? > Index: io.c > =================================================================== > RCS file: /data/cvs/rsync/io.c,v > retrieving revision 1.115 > diff -u -p -r1.115 io.c > --- io.c 26 Dec 2003 23:04:01 -0000 1.115 > +++ io.c 12 Feb 2004 23:33:42 -0000 > @@ -655,6 +655,11 @@ static void writefd_unbuffered(int fd,ch > continue; > } > > + if (ret == -1 && errno == ENOBUFS) { > + msleep(100); /* system overload, back off */ > + continue; > + } > + > if (ret <= 0) { > /* Don't try to write errors back > * across the stream */ > -- Cristian -- ---------------------------------------------------------------------- Cristian Gafton -- [EMAIL PROTECTED] -- Red Hat, Inc. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "There are two kinds of people who never amount to much: those who cannot do what they are told, and those who can do nothing else." --Cyrus Curtis -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html