Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp487534ybl; Sun, 1 Dec 2019 06:38:58 -0800 (PST) X-Google-Smtp-Source: APXvYqxpEJDjx2KdxwtbdqyNkP9B7rxpgzOl1g6LO3EpfjaH+eD21G0bU+GCs/fMvWbJi8nayREf X-Received: by 2002:a17:906:fcd2:: with SMTP id qx18mr6782588ejb.230.1575211138032; Sun, 01 Dec 2019 06:38:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575211138; cv=none; d=google.com; s=arc-20160816; b=GlpJuvH5G0/95a5pMTc0IjRs6O72K2cQ7X1yOFeQMjwBJNZ4mGhTtFjKSyXuejyyFt vTvBtqivRNlvYE+WKOx6VFlqL++uT1cJsHtRpx8PXWDe/pnrc1P0RIGc0P/HVpZjSvxd QiNLBIpogGvVkG0P33cBu3G/NyWLgTif3dc9cNxE/ANNJgJ6Ucu2O1i8p/eBceHIb1e2 u7GoZQfCW0xL3SDQ947dgGK7fD6kR+CVgAzyf7csKFIfYWgxJtjYu/kYATtldXNgyMMj iP2RhXVqTMn1q9YGvRdTIxH6DIt6Rum/ugVGfg5gT2I6CpLekMY0kQj/1/rKDlfoP0vS /0hA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=O+tPEAQvNgaPRDh7dBkSdN0UOAHzyHiYTSwyrrWl7ZE=; b=IzcBnjsKkNLPBKEbRndrEbr6AQJtLyVmKMrtGGnf9j0I7+8GYP8Jr1und2e5Cur4lp yXGQdJomSiuGNtOEtCBxbXsAl2EEr0bf954XmtP1MUQ4X0hh1ew++oV9xsd2RwCw/vGj zpaYhN8BdhhVztW74OC+9EvXEORbMjADHPF7f22cXoW/PCuQjTHoxvBydU/w60lbe4vx wFdHLW5fxPUhy2b6yRnYJtAaTKohw8oLLqIwNlK3DrdXSrHANxDupGzez3otL0zqbk9y uduW4ill/DvQAtOOYtxl/L7C1vPAVECgFLGE844qdk4L5XXrwKUKRGIvHF7a10/9Z+VG 7qjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=X8LvnoV+; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x1si12185200ejj.63.2019.12.01.06.38.34; Sun, 01 Dec 2019 06:38:58 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=X8LvnoV+; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727268AbfLAOek (ORCPT + 99 others); Sun, 1 Dec 2019 09:34:40 -0500 Received: from mail.kernel.org ([198.145.29.99]:49114 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726498AbfLAOej (ORCPT ); Sun, 1 Dec 2019 09:34:39 -0500 Received: from localhost (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 098B120725; Sun, 1 Dec 2019 14:34:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1575210878; bh=K8rs8jjTNo+YjtPHch9ujxhFdvlkbw04xZ/DlEjvXmA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=X8LvnoV+ZPy/EFvVU0aJRwEOLjieEn833fKjD4mA1VvGWFWPgDzkbvmwPpedC01uS 4v5RBKw7xncGiVV7KGxzU4J231F8BfqeXGG69xfzgH/8kE1chbYSSl6hE7tPMqVnJT Ke3CEUQp3PVqEw+u6cztQz1F1v+MEx6/EQdhXnhw= Date: Sun, 1 Dec 2019 09:34:36 -0500 From: Sasha Levin To: Ilya Dryomov Cc: LKML , stable@vger.kernel.org, Ceph Development , netdev Subject: Re: [PATCH AUTOSEL 4.19 140/219] libceph: drop last_piece logic from write_partial_message_data() Message-ID: <20191201143436.GS5861@sasha-vm> References: <20191122054911.1750-1-sashal@kernel.org> <20191122054911.1750-133-sashal@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 22, 2019 at 03:00:43PM +0100, Ilya Dryomov wrote: >On Fri, Nov 22, 2019 at 6:51 AM Sasha Levin wrote: >> >> From: Ilya Dryomov >> >> [ Upstream commit 1f6b821aef78e3d79e8d598ae59fc7e23fb6c563 ] >> >> 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 >> Signed-off-by: Sasha Levin >> --- >> net/ceph/messenger.c | 8 +++----- >> 1 file changed, 3 insertions(+), 5 deletions(-) >> >> diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c >> index f7d7f32ac673c..6514816947fbe 100644 >> --- a/net/ceph/messenger.c >> +++ b/net/ceph/messenger.c >> @@ -1612,7 +1612,6 @@ static int write_partial_message_data(struct ceph_connection *con) >> struct page *page; >> size_t page_offset; >> size_t length; >> - bool last_piece; >> int ret; >> >> if (!cursor->resid) { >> @@ -1620,10 +1619,9 @@ static int write_partial_message_data(struct ceph_connection *con) >> 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); > >Hi Sasha, > >This commit was part of a larger series and shouldn't be backported on >its own. Please drop it. Now dropped, thanks! -- Thanks, Sasha