From a056289d3a52ef5a12daf3715ad2d8cd496add7b Mon Sep 17 00:00:00 2001 From: Patrick Farrell Date: Sat, 28 Oct 2023 22:16:01 -0400 Subject: [PATCH] EX-7601 tgt: add second tbc lnb for RDMA Compression requires the server to do local IO which differs from the IO requested by the client. This means we cannot directly use the IO niobufs for doing the transfer to the client. So we add a second set of lnb pointers, which are used to point at a specific subset of the pages in the main per-thread cache. This subset will be used for doing the transfer to the client. Signed-off-by: Patrick Farrell Change-Id: I53aa46045aaf335da20a311900ac0bf425823b22 Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/52881 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Artem Blagodarenko Reviewed-by: Andreas Dilger --- lustre/include/obd.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lustre/include/obd.h b/lustre/include/obd.h index f03c2e6..eb1d232 100644 --- a/lustre/include/obd.h +++ b/lustre/include/obd.h @@ -481,7 +481,17 @@ void unmerge_chunk(struct brw_page **pga, struct niobuf_local *lnb, int first, int count, char *merged, unsigned int size); struct tgt_thread_big_cache { + /* these work out to MAX_BRW_SIZE / PAGE_SIZE * PTR_SIZE, so for + * x86_64, this is currently 64 MiB / 4K * PTR_SIZE, or 128K + * For 64K pages (ARM), this is 8K. + */ struct niobuf_local tbc_lnb[PTLRPC_MAX_BRW_PAGES]; + /* a second set of lnb pointers, which will generally be used to point + * at a specific subset of the pages in the first tbc_lnb, which is + * required for compression where the server does different local IO + * than what is communicated from the client + */ + struct niobuf_local tbc_lnb2[PTLRPC_MAX_BRW_PAGES]; }; #define LUSTRE_FLD_NAME "fld" -- 1.8.3.1