From: Christian Schoenebeck <linux_oss@crudebyte.com>
To: v9fs-developer@lists.sourceforge.net,
Eric Van Hensbergen <ericvh@gmail.com>,
Dominique Martinet <asmadeus@codewreck.org>
Cc: Latchesar Ionkov <lucho@ionkov.net>,
linux-kernel@vger.kernel.org, Jens Axboe <axboe@kernel.dk>,
Pengfei Xu <pengfei.xu@intel.com>,
Dominique Martinet <asmadeus@codewreck.org>
Subject: Re: [PATCH 2/5] 9p/net: share pooled receive buffers size exception in p9_tag_alloc
Date: Mon, 13 Feb 2023 19:06:13 +0100 [thread overview]
Message-ID: <2221747.x32gLWZWRm@silver> (raw)
In-Reply-To: <20230211075023.137253-3-asmadeus@codewreck.org>
On Saturday, February 11, 2023 8:50:20 AM CET Dominique Martinet wrote:
> The async RPC code will also use an automatic size and this bit of code
> can be shared, as p9_tag_alloc still knows what client we alloc for.
>
> Signed-off-by: Dominique Martinet <asmadeus@codewreck.org>
Reviewed-by: Christian Schoenebeck <linux_oss@crudebyte.com>
> ---
> net/9p/client.c | 23 +++++++++++------------
> 1 file changed, 11 insertions(+), 12 deletions(-)
>
> diff --git a/net/9p/client.c b/net/9p/client.c
> index 53ebd07c36ee..4e5238db4a7a 100644
> --- a/net/9p/client.c
> +++ b/net/9p/client.c
> @@ -282,8 +282,15 @@ p9_tag_alloc(struct p9_client *c, int8_t type, uint t_size, uint r_size,
> t_size ?: p9_msg_buf_size(c, type, fmt, apc));
> va_end(apc);
>
> - alloc_rsize = min_t(size_t, c->msize,
> - r_size ?: p9_msg_buf_size(c, type + 1, fmt, ap));
> + /* Currently RDMA transport is excluded from response message size
> + * optimization, as it cannot cope with it due to its pooled response
> + * buffers (this has no impact on request size)
> + */
> + if (r_size == 0 && c->trans_mod->pooled_rbuffers)
> + alloc_rsize = c->msize;
> + else
> + alloc_rsize = min_t(size_t, c->msize,
> + r_size ?: p9_msg_buf_size(c, type + 1, fmt, ap));
>
> if (!req)
> return ERR_PTR(-ENOMEM);
> @@ -728,18 +735,10 @@ p9_client_rpc(struct p9_client *c, int8_t type, const char *fmt, ...)
> int sigpending, err;
> unsigned long flags;
> struct p9_req_t *req;
> - /* Passing zero for tsize/rsize to p9_client_prepare_req() tells it to
> - * auto determine an appropriate (small) request/response size
> - * according to actual message data being sent. Currently RDMA
> - * transport is excluded from this response message size optimization,
> - * as it would not cope with it, due to its pooled response buffers
> - * (using an optimized request size for RDMA as well though).
> - */
> - const uint tsize = 0;
> - const uint rsize = c->trans_mod->pooled_rbuffers ? c->msize : 0;
>
> va_start(ap, fmt);
> - req = p9_client_prepare_req(c, type, tsize, rsize, fmt, ap);
> + /* auto determine an appropriate request/response size */
> + req = p9_client_prepare_req(c, type, 0, 0, fmt, ap);
> va_end(ap);
> if (IS_ERR(req))
> return req;
>
next prev parent reply other threads:[~2023-02-13 18:07 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-11 7:50 [PATCH 0/5] Take 3 at async RPCs and no longer looping forever on signals Dominique Martinet
2023-02-11 7:50 ` [PATCH 1/5] 9p/net: move code in preparation of async rpc Dominique Martinet
2023-02-13 17:46 ` Christian Schoenebeck
2023-02-11 7:50 ` [PATCH 2/5] 9p/net: share pooled receive buffers size exception in p9_tag_alloc Dominique Martinet
2023-02-13 18:06 ` Christian Schoenebeck [this message]
2023-02-11 7:50 ` [PATCH 3/5] 9p/net: implement asynchronous rpc skeleton Dominique Martinet
2023-02-11 7:50 ` [PATCH 4/5] 9p/net: add async clunk for retries Dominique Martinet
2023-02-11 7:50 ` [PATCH 5/5] 9p/net: make flush asynchronous Dominique Martinet
2023-02-11 8:05 ` [PATCH 0/5] Take 3 at async RPCs and no longer looping forever on signals Dominique Martinet
2023-02-13 18:26 ` Christian Schoenebeck
2023-02-13 18:45 ` Christian Schoenebeck
2023-02-13 22:37 ` Dominique Martinet
2023-02-14 9:34 ` Christian Schoenebeck
2023-02-14 11:16 ` Dominique Martinet
2023-03-19 11:53 ` [V9fs-developer] " Dominique Martinet
2023-03-23 15:58 ` Christian Schoenebeck
2023-03-25 12:45 ` Christian Schoenebeck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2221747.x32gLWZWRm@silver \
--to=linux_oss@crudebyte.com \
--cc=asmadeus@codewreck.org \
--cc=axboe@kernel.dk \
--cc=ericvh@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lucho@ionkov.net \
--cc=pengfei.xu@intel.com \
--cc=v9fs-developer@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.