diff options
author | Eric Wong <normalperson@yhbt.net> | 2013-03-02 10:56:17 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2013-03-02 11:18:27 +0000 |
commit | f128eea752d51a566996043fd159da9be8d83597 (patch) | |
tree | ddc988d53fc76ad88f0251512fa65818245c0f78 | |
parent | 20bcb2ccc3d3d38b0fc2f16c25cad74d8404d5bb (diff) | |
download | cmogstored-f128eea752d51a566996043fd159da9be8d83597.tar.gz |
tls_rbuf allows us to avoid nearly all dynamic allocation for common HTTP requests. However, the mog_rbuf structure may be detached from TLS as necessary (and another one allocated in its place) when the need arises.
-rw-r--r-- | alloc.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -1,6 +1,12 @@ /* * Copyright (C) 2012-2013, Eric Wong <normalperson@yhbt.net> * License: GPLv3 or later (see COPYING for details) + * + * We use thread-local buffers as much as possible. mog_rbuf may + * be detached from the thread-local pointer (and grown) if we have + * requests trickled to us or large requests. This is unlikely with + * MogileFS (which only deals with internal LAN traffic), and unlikely + * even with normal, untrusted HTTP traffic. */ #include "cmogstored.h" #define L1_CACHE_LINE_MAX 128 /* largest I've seen (Pentium 4) */ |