]> git.puffer.fish Git - mirror/frr.git/commitdiff
2005-04-26 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
authorajs <ajs>
Tue, 26 Apr 2005 17:14:30 +0000 (17:14 +0000)
committerajs <ajs>
Tue, 26 Apr 2005 17:14:30 +0000 (17:14 +0000)
* buffer.c (buffer_write): Comment out call to buffer_flush_available.
  This should speed up buffering at the expense of a possible increase
  in latency in flushing the data if inside a long-running thread.

lib/ChangeLog
lib/buffer.c

index 8c805dfc5c36e254bbd30360be1ffc39bfc6140a..115062026f4734e42f9c5b647121490dd23c6cae 100644 (file)
@@ -1,3 +1,9 @@
+2005-04-26 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
+
+       * buffer.c (buffer_write): Comment out call to buffer_flush_available.
+         This should speed up buffering at the expense of a possible increase
+         in latency in flushing the data if inside a long-running thread.
+
 2005-04-25 Paul Jakma <paul.jakma@sun.com>
 
        * workqueue.{c,h}: Helper API for setting up and running queues via
index 48fd35af697f05f60f1cf65a9beca8bb98a4234a..81cd0f2aa23e1bc554f7b27ddfb021bdba644be9 100644 (file)
@@ -464,11 +464,16 @@ buffer_write(struct buffer *b, int fd, const void *p, size_t size)
 {
   ssize_t nbytes;
 
-  /* Attempt to drain the previously buffered data? */
+#if 0
+  /* Should we attempt to drain any previously buffered data?  This could help
+     reduce latency in pushing out the data if we are stuck in a long-running
+     thread that is preventing the main select loop from calling the flush
+     thread... */
   if (b->head && (buffer_flush_available(b, fd) == BUFFER_ERROR))
     return BUFFER_ERROR;
+#endif
   if (b->head)
-    /* Buffer still not empty. */
+    /* Buffer is not empty, so do not attempt to write the new data. */
     nbytes = 0;
   else if ((nbytes = write(fd, p, size)) < 0)
     {