[hail patch 4/7] Go to 64K chunkd buffers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <zaitcev@xxxxxxxxxx>

---
 server/object.c  |    2 +-
 server/storage.c |    2 +-
 server/tabled.h  |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

commit e19aedbe09d5cd159ec6b86be4dea9958fba2905
Author: Pete Zaitcev <zaitcev@xxxxxxxxx>
Date:   Thu Jul 29 19:32:47 2010 -0600

    64K I/O.

diff --git a/server/object.c b/server/object.c
index 207bb3e..d495d6e 100644
--- a/server/object.c
+++ b/server/object.c
@@ -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;
diff --git a/server/storage.c b/server/storage.c
index a63012e..cac5a96 100644
--- a/server/storage.c
+++ b/server/storage.c
@@ -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;
 	}
diff --git a/server/tabled.h b/server/tabled.h
index ae67838..ff419e3 100644
--- a/server/tabled.h
+++ b/server/tabled.h
@@ -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 {
--
To unsubscribe from this list: send the line "unsubscribe hail-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Fedora Clound]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux