All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 00/13] Put struct nfsd4_copy on a diet
@ 2022-07-27 18:39 Chuck Lever
  2022-07-27 18:40 ` [PATCH v2 01/13] NFSD: Fix strncpy() fortify warning Chuck Lever
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: Chuck Lever @ 2022-07-27 18:39 UTC (permalink / raw)
  To: linux-nfs

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.

Changes since v1:
- Fix a compile-time bug spotted by the kernel 0-day robot
- Fix a crasher reported by Dai, then by Olga
- Add two more clean-up patches

---

Chuck Lever (13):
      NFSD: Fix strncpy() fortify warning
      NFSD: nfserrno(-ENOMEM) is nfserr_jukebox
      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      | 169 ++++++++++++++++++++--------------------
 fs/nfsd/nfs4xdr.c       |  33 +++++---
 fs/nfsd/state.h         |   1 -
 fs/nfsd/xdr4.h          |  54 +++++++++----
 include/linux/nfs_ssc.h |   2 +-
 6 files changed, 167 insertions(+), 129 deletions(-)

--
Chuck Lever


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2022-07-27 19:07 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-27 18:39 [PATCH v2 00/13] Put struct nfsd4_copy on a diet Chuck Lever
2022-07-27 18:40 ` [PATCH v2 01/13] NFSD: Fix strncpy() fortify warning Chuck Lever
2022-07-27 18:40 ` [PATCH v2 02/13] NFSD: nfserrno(-ENOMEM) is nfserr_jukebox Chuck Lever
2022-07-27 18:40 ` [PATCH v2 03/13] NFSD: Shrink size of struct nfsd4_copy_notify Chuck Lever
2022-07-27 18:40 ` [PATCH v2 04/13] NFSD: Shrink size of struct nfsd4_copy Chuck Lever
2022-07-27 18:40 ` [PATCH v2 05/13] NFSD: Reorder the fields in struct nfsd4_op Chuck Lever
2022-07-27 18:40 ` [PATCH v2 06/13] NFSD: Make nfs4_put_copy() static Chuck Lever
2022-07-27 18:40 ` [PATCH v2 07/13] NFSD: Make boolean fields in struct nfsd4_copy into atomic bit flags Chuck Lever
2022-07-27 18:40 ` [PATCH v2 08/13] NFSD: Refactor nfsd4_cleanup_inter_ssc() (1/2) Chuck Lever
2022-07-27 18:40 ` [PATCH v2 09/13] NFSD: Refactor nfsd4_cleanup_inter_ssc() (2/2) Chuck Lever
2022-07-27 18:40 ` [PATCH v2 10/13] NFSD: Refactor nfsd4_do_copy() Chuck Lever
2022-07-27 18:41 ` [PATCH v2 11/13] NFSD: Remove kmalloc from nfsd4_do_async_copy() Chuck Lever
2022-07-27 18:41 ` [PATCH v2 12/13] NFSD: Add nfsd4_send_cb_offload() Chuck Lever
2022-07-27 18:41 ` [PATCH v2 13/13] NFSD: Move copy offload callback arguments into a separate structure Chuck Lever

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.