Go to 64K chunkd buffers
PATCH 4/7 Go to 64K chunkd buffers
It only took one definition change, but there was a couple of coattail riders.
- The batching-up of the writes is not really relevant and everything works just fine without, but 64K made it obvious that it wasn't actually working. It must be at least one buffer big, or the condition never trips.
- Not exactly sure if I ever saw a hang due to half-buffer write and a lost notification. Maybe. But thinking about it it's obvious that we want a notification if any write is outstanding (rc nonzero).
Signed-off-by Pete Zaitcev <[email protected]>
--- server/object.c | 2 +- server/storage.c | 2 +- server/tabled.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
commit e19aedbe09d5cd159ec6b86be4dea9958fba2905
Author: Pete Zaitcev <[email protected]> Date: Thu Jul 29 19:32:47 2010 -0600
64K I/O.
server/object.c +1 -1
@@ -1027,7 +1027,7 @@ static bool object_get_poke(struct client *cli) }else {if (cli_writeq (cli, buf, bytes, object_get_more, buf)) goto err_out; -if (cli_wqueued (cli) >=4000 ) +if (cli_wqueued (cli) >=CLI_DATA_BUF_SZ )cli_write_start (cli); }return true;
server/storage.c +1 -1
@@ -290,7 +290,7 @@ ssize_t stor_put_buf(struct open_chunk *cep, void *data, size_t len)if (!cep->stc)return -EPIPE ; rc =stc_put_send (cep->stc, data, len); -if (rc ==0 && !cep->w_armed) { +if (rc < len && !cep->w_armed) {event_add (&cep->wevt,NULL ); cep->w_armed = true; }
server/tabled.h +1 -1
@@ -49,7 +49,7 @@ enum {CHUNK_REBOOT_TIME =3 *60 ,/* secs to declare chunk dead */ CLI_REQ_BUF_SZ =8192 ,/* buffer for req + hdrs */ - CLI_DATA_BUF_SZ = 8192, + CLI_DATA_BUF_SZ = 65536, }; enum errcode {