]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
[OPTIM] reorder http_txn to optimize cache lines placement
authorWilly Tarreau <w@1wt.eu>
Sun, 10 Jan 2010 10:31:22 +0000 (11:31 +0100)
committerWilly Tarreau <w@1wt.eu>
Sun, 10 Jan 2010 10:31:22 +0000 (11:31 +0100)
This re-ordering brings about 3% of performance boost on x86_64
on pipeline intensive requests, which means it mainly benefits
the parsers.

include/types/proto_http.h

index c68b0c9d6ef8e50a8e69d23ee81c236f28876b31..ba23968fb46e629c8541d4fe0542747e82e26983 100644 (file)
@@ -303,17 +303,20 @@ struct http_msg {
  * response message (which can be empty).
  */
 struct http_txn {
-       http_meth_t meth;               /* HTTP method */
+       struct http_msg req;            /* HTTP request message */
        struct hdr_idx hdr_idx;         /* array of header indexes (max: MAX_HTTP_HDR) */
-       struct chunk auth_hdr;          /* points to 'Authorization:' header */
-       struct http_msg req, rsp;       /* HTTP request and response messages */
+       unsigned int flags;             /* transaction flags */
+       http_meth_t meth;               /* HTTP method */
+
+       int status;                     /* HTTP status from the server, negative if from proxy */
+       struct http_msg rsp;            /* HTTP response message */
 
-       char *uri;                      /* first line if log needed, NULL otherwise */
-       char *cli_cookie;               /* cookie presented by the client, in capture mode */
-       char *srv_cookie;               /* cookie presented by the server, in capture mode */
+       char *uri;                      /* first line if log needed, NULL otherwise */
+       char *cli_cookie;               /* cookie presented by the client, in capture mode */
+       char *srv_cookie;               /* cookie presented by the server, in capture mode */
        char *sessid;                   /* the appsession id, if found in the request or in the response */
-       int status;                     /* HTTP status from the server, negative if from proxy */
-       unsigned int flags;             /* transaction flags */
+
+       struct chunk auth_hdr;          /* points to 'Authorization:' header */
 };
 
 /* This structure is used by http_find_header() to return values of headers.