All of lore.kernel.org
 help / color / mirror / Atom feed
From: Olga Kornievskaia <aglo@umich.edu>
To: Chuck Lever <chuck.lever@oracle.com>
Cc: linux-nfs <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH v1 00/11] Put struct nfsd4_copy on a diet
Date: Tue, 26 Jul 2022 15:45:36 -0400	[thread overview]
Message-ID: <CAN-5tyEgRvvFq51kdT-ROo-ew71JE610Da=Cqf_Ya4dgYxEmKg@mail.gmail.com> (raw)
In-Reply-To: <165852076926.11403.44005570813790008.stgit@manet.1015granger.net>

Chuck,

Are there pre-reqs for this series? I had tried to apply the patches
on top of 5-19-rc6 but I get the following compile error:

fs/nfsd/nfs4proc.c: In function ‘nfsd4_setup_inter_ssc’:
fs/nfsd/nfs4proc.c:1539:34: error: passing argument 1 of
‘nfsd4_interssc_connect’ from incompatible pointer type
[-Werror=incompatible-pointer-types]
  status = nfsd4_interssc_connect(&copy->cp_src, rqstp, mount);
                                  ^~~~~~~~~~~~~
fs/nfsd/nfs4proc.c:1414:43: note: expected ‘struct nl4_server *’ but
argument is of type ‘struct nl4_server **’
 nfsd4_interssc_connect(struct nl4_server *nss, struct svc_rqst *rqstp,
                        ~~~~~~~~~~~~~~~~~~~^~~
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:249: fs/nfsd/nfs4proc.o] Error 1
make[1]: *** [scripts/Makefile.build:466: fs/nfsd] Error 2
make: *** [Makefile:1843: fs] Error 2

On Fri, Jul 22, 2022 at 4:36 PM Chuck Lever <chuck.lever@oracle.com> wrote:
>
> While testing NFSD for-next, I noticed svc_generic_init_request()
> was an unexpected hot spot on NFSv4 workloads. Drilling into the
> perf report, it shows that the hot path in there is:
>
> 1208         memset(rqstp->rq_argp, 0, procp->pc_argsize);
> 1209         memset(rqstp->rq_resp, 0, procp->pc_ressize);
>
> For an NFSv4 COMPOUND,
>
>         procp->pc_argsize = sizeof(nfsd4_compoundargs),
>
> struct nfsd4_compoundargs on my system is more than 17KB! This is
> due to the size of the iops field:
>
>         struct nfsd4_op                 iops[8];
>
> Each struct nfsd4_op contains a union of the arguments for each
> NFSv4 operation. Each argument is typically less than 128 bytes
> except that struct nfsd4_copy and struct nfsd4_copy_notify are both
> larger than 2KB each.
>
> I'm not yet totally convinced this series never orphans memory, but
> it does reduce the size of nfsd4_compoundargs to just over 4KB. This
> is still due to struct nfsd4_copy being almost 500 bytes. I don't
> see more low-hanging fruit there, though.
>
> ---
>
> Chuck Lever (11):
>       NFSD: Shrink size of struct nfsd4_copy_notify
>       NFSD: Shrink size of struct nfsd4_copy
>       NFSD: Reorder the fields in struct nfsd4_op
>       NFSD: Make nfs4_put_copy() static
>       NFSD: Make boolean fields in struct nfsd4_copy into atomic bit flags
>       NFSD: Refactor nfsd4_cleanup_inter_ssc() (1/2)
>       NFSD: Refactor nfsd4_cleanup_inter_ssc() (2/2)
>       NFSD: Refactor nfsd4_do_copy()
>       NFSD: Remove kmalloc from nfsd4_do_async_copy()
>       NFSD: Add nfsd4_send_cb_offload()
>       NFSD: Move copy offload callback arguments into a separate structure
>
>
>  fs/nfsd/nfs4callback.c |  37 +++++----
>  fs/nfsd/nfs4proc.c     | 165 +++++++++++++++++++++--------------------
>  fs/nfsd/nfs4xdr.c      |  30 +++++---
>  fs/nfsd/state.h        |   1 -
>  fs/nfsd/xdr4.h         |  54 ++++++++++----
>  5 files changed, 163 insertions(+), 124 deletions(-)
>
> --
> Chuck Lever
>

  parent reply	other threads:[~2022-07-26 19:45 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-22 20:18 [PATCH v1 00/11] Put struct nfsd4_copy on a diet Chuck Lever
2022-07-22 20:19 ` [PATCH v1 01/11] NFSD: Shrink size of struct nfsd4_copy_notify Chuck Lever
2022-07-25 14:19   ` Olga Kornievskaia
2022-07-25 14:36     ` Chuck Lever III
2022-07-22 20:19 ` [PATCH v1 02/11] NFSD: Shrink size of struct nfsd4_copy Chuck Lever
2022-07-24  6:30   ` kernel test robot
2022-07-22 20:19 ` [PATCH v1 03/11] NFSD: Reorder the fields in struct nfsd4_op Chuck Lever
2022-07-22 20:19 ` [PATCH v1 04/11] NFSD: Make nfs4_put_copy() static Chuck Lever
2022-07-22 20:19 ` [PATCH v1 05/11] NFSD: Make boolean fields in struct nfsd4_copy into atomic bit flags Chuck Lever
2022-07-22 20:19 ` [PATCH v1 06/11] NFSD: Refactor nfsd4_cleanup_inter_ssc() (1/2) Chuck Lever
2022-07-22 20:19 ` [PATCH v1 07/11] NFSD: Refactor nfsd4_cleanup_inter_ssc() (2/2) Chuck Lever
2022-07-22 20:19 ` [PATCH v1 08/11] NFSD: Refactor nfsd4_do_copy() Chuck Lever
2022-07-22 20:19 ` [PATCH v1 09/11] NFSD: Remove kmalloc from nfsd4_do_async_copy() Chuck Lever
2022-07-22 20:19 ` [PATCH v1 10/11] NFSD: Add nfsd4_send_cb_offload() Chuck Lever
2022-07-22 20:20 ` [PATCH v1 11/11] NFSD: Move copy offload callback arguments into a separate structure Chuck Lever
2022-07-26 19:45 ` Olga Kornievskaia [this message]
2022-07-27 16:18   ` [PATCH v1 00/11] Put struct nfsd4_copy on a diet Olga Kornievskaia
2022-07-27 16:38     ` dai.ngo
2022-07-27 17:15     ` Chuck Lever III
2022-07-27 17:52       ` Olga Kornievskaia
2022-07-27 18:04         ` Chuck Lever III
2022-07-27 18:21           ` Olga Kornievskaia
2022-07-27 18:48             ` Olga Kornievskaia
2022-07-27 19:23               ` dai.ngo

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='CAN-5tyEgRvvFq51kdT-ROo-ew71JE610Da=Cqf_Ya4dgYxEmKg@mail.gmail.com' \
    --to=aglo@umich.edu \
    --cc=chuck.lever@oracle.com \
    --cc=linux-nfs@vger.kernel.org \
    /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.