]> git.baikalelectronics.ru Git - kernel.git/commit
net/9p: allocate appropriate reduced message buffers
authorChristian Schoenebeck <linux_oss@crudebyte.com>
Fri, 15 Jul 2022 21:33:56 +0000 (23:33 +0200)
committerDominique Martinet <asmadeus@codewreck.org>
Tue, 4 Oct 2022 22:05:41 +0000 (07:05 +0900)
commite3f98f8826fb0fbd0dba586f36b3a3e3badaab42
tree544ee183389b5867645c4bd9f3183b865a0f745e
parentbe6dfb28ef2318edb1ed5c3813dbe93d2a738161
net/9p: allocate appropriate reduced message buffers

So far 'msize' was simply used for all 9p message types, which is far
too much and slowed down performance tremendously with large values
for user configurable 'msize' option.

Let's stop this waste by using the new p9_msg_buf_size() function for
allocating more appropriate, smaller buffers according to what is
actually sent over the wire.

Only exception: RDMA transport is currently excluded from this message
size optimization - for its response buffers that is - as RDMA transport
would not cope with it, due to its response buffers being pulled from a
shared pool. [1]

Link: https://lore.kernel.org/all/Ys3jjg52EIyITPua@codewreck.org/
Link: https://lkml.kernel.org/r/3f51590535dc96ed0a165b8218c57639cfa5c36c.1657920926.git.linux_oss@crudebyte.com
Signed-off-by: Christian Schoenebeck <linux_oss@crudebyte.com>
Signed-off-by: Dominique Martinet <asmadeus@codewreck.org>
net/9p/client.c