Skip to content

Commit

Permalink
DAOS-16894 bio: prealloc less DMA buffer for sys tgt
Browse files Browse the repository at this point in the history
Sys target needs only very limited DMA buffer for the WAL of RDB,
we can prealloc only 1 chunk for sys target so that leave more
hugepages for regular VOS targets.

Signed-off-by: Niu Yawei <[email protected]>
  • Loading branch information
NiuYawei committed Jan 6, 2025
1 parent 14bddd2 commit a247fca
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/bio/bio_xstream.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/**
* (C) Copyright 2018-2024 Intel Corporation.
* (C) Copyright 2025 Hewlett Packard Enterprise Development LP
*
* SPDX-License-Identifier: BSD-2-Clause-Patent
*/
Expand Down Expand Up @@ -1686,7 +1687,9 @@ bio_xsctxt_alloc(struct bio_xs_context **pctxt, int tgt_id, bool self_polling)
D_ASSERT(d_bdev != NULL);
}

ctxt->bxc_dma_buf = dma_buffer_create(init_chk_cnt(), tgt_id);
/* Sys target only needs very limited DMA buffer for the WAL of RDB */
ctxt->bxc_dma_buf = dma_buffer_create(tgt_id == BIO_SYS_TGT_ID ? 1 : init_chk_cnt(),
tgt_id);
if (ctxt->bxc_dma_buf == NULL) {
D_ERROR("failed to initialize dma buffer\n");
rc = -DER_NOMEM;
Expand Down

0 comments on commit a247fca

Please sign in to comment.