Home Home > GIT Browse > SLE15-SP1
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuis Henriques <lhenriques@suse.com>2019-01-16 16:12:01 +0000
committerLuis Henriques <lhenriques@suse.com>2019-01-18 11:21:08 +0000
commit1a6b0c5329b9e4d104ab1623cb8f6b5cb2fccc06 (patch)
tree7d395462254c7e5c7fb4021ccda895a37db078c6
parentcade00e18cf9cfe2c1897d52f5be656e80bfe602 (diff)
libceph: drop last_piece logic from write_partial_message_data()
(bsc#1122215).
-rw-r--r--patches.suse/libceph-drop-last_piece-logic-from-write_partial_message_data.patch55
-rw-r--r--series.conf1
2 files changed, 56 insertions, 0 deletions
diff --git a/patches.suse/libceph-drop-last_piece-logic-from-write_partial_message_data.patch b/patches.suse/libceph-drop-last_piece-logic-from-write_partial_message_data.patch
new file mode 100644
index 0000000000..3156d78acd
--- /dev/null
+++ b/patches.suse/libceph-drop-last_piece-logic-from-write_partial_message_data.patch
@@ -0,0 +1,55 @@
+From: Ilya Dryomov <idryomov@gmail.com>
+Date: Wed, 14 Nov 2018 12:24:01 +0100
+Subject: libceph: drop last_piece logic from write_partial_message_data()
+Git-commit: 1f6b821aef78e3d79e8d598ae59fc7e23fb6c563
+Patch-mainline: v5.0-rc1
+References: bsc#1122215
+
+last_piece is for the last piece in the current data item, not in the
+entire data payload of the message. This is harmful for messages with
+multiple data items. On top of that, we don't need to signal the end
+of a data payload either because it is always followed by a footer.
+
+We used to signal "more" unconditionally, until commit fe38a2b67bc6
+("libceph: start defining message data cursor"). Part of a large
+series, it introduced cursor->last_piece and also mistakenly inverted
+the hint by passing last_piece for "more". This was corrected with
+commit c2cfa1940097 ("libceph: Fix ceph_tcp_sendpage()'s more boolean
+usage").
+
+As it is, last_piece is not helping at all: because Nagle algorithm is
+disabled, for a simple message with two 512-byte data items we end up
+emitting three packets: front + first data item, second data item and
+footer. Go back to the original pre-fe38a2b67bc6 behavior -- a single
+packet in most cases.
+
+Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
+Acked-by: Luis Henriques <lhenriques@suse.com>
+---
+ net/ceph/messenger.c | 8 +++-----
+ 1 file changed, 3 insertions(+), 5 deletions(-)
+
+--- a/net/ceph/messenger.c
++++ b/net/ceph/messenger.c
+@@ -1611,7 +1611,6 @@ static int write_partial_message_data(st
+ struct page *page;
+ size_t page_offset;
+ size_t length;
+- bool last_piece;
+ int ret;
+
+ if (!cursor->resid) {
+@@ -1619,10 +1618,9 @@ static int write_partial_message_data(st
+ continue;
+ }
+
+- page = ceph_msg_data_next(cursor, &page_offset, &length,
+- &last_piece);
+- ret = ceph_tcp_sendpage(con->sock, page, page_offset,
+- length, !last_piece);
++ page = ceph_msg_data_next(cursor, &page_offset, &length, NULL);
++ ret = ceph_tcp_sendpage(con->sock, page, page_offset, length,
++ true);
+ if (ret <= 0) {
+ if (do_datacrc)
+ msg->footer.data_crc = cpu_to_le32(crc);
diff --git a/series.conf b/series.conf
index f16cbb1a54..daee04e8ee 100644
--- a/series.conf
+++ b/series.conf
@@ -42494,6 +42494,7 @@
patches.suse/mm-speed-up-mremap-by-20x-on-large-regions.patch
patches.suse/ceph-cleanup-splice_dentry.patch
patches.suse/ceph-remove-redundant-assignment.patch
+ patches.suse/libceph-drop-last_piece-logic-from-write_partial_message_data.patch
patches.fixes/ceph-don-t-update-importing-cap-s-mseq-when-handing-cap-export.patch
patches.fixes/xfs-xfs_buf-drop-useless-LIST_HEAD.patch
patches.drivers/thermal-bcm2835-enable-hwmon-explicitly.patch