summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2015-09-28 23:25:52 +0200
committerantirez <antirez@gmail.com>2015-09-30 16:29:42 +0200
commit825f65d2bdc86b4efae3d79fd39b0de3343c3474 (patch)
treeac1c1ce7d3c86aebb7b7e00a5711ab3102283ba5
parent063ecbd5e59d536d2db661c2953eaef016a60ee7 (diff)
downloadredis-825f65d2bdc86b4efae3d79fd39b0de3343c3474.tar.gz
Reverse list of clients with pending writes.
May potentially improve locality... not exactly clear if this makes a difference or not. But for sure is harmless.
-rw-r--r--src/networking.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/networking.c b/src/networking.c
index 9d4c94d28..9a69f0fb0 100644
--- a/src/networking.c
+++ b/src/networking.c
@@ -177,7 +177,7 @@ int prepareClientToWrite(client *c) {
* a system call. We'll only really install the write handler if
* we'll not be able to write the whole reply at once. */
c->flags |= CLIENT_PENDING_WRITE;
- listAddNodeTail(server.clients_pending_write,c);
+ listAddNodeHead(server.clients_pending_write,c);
}
/* Authorize the caller to queue in the output buffer of this client. */