Date: Fri, 19 Jan 2024 17:17:30 GMT From: Alexander Motin <mav@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: e82c6e941e6a - stable/14 - mpi3mr: Remove unused fields in struct mpi3mr_cmd Message-ID: <202401191717.40JHHUIw096802@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/14 has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=e82c6e941e6a9ca34ad493018bcd43257bb08061 commit e82c6e941e6a9ca34ad493018bcd43257bb08061 Author: Warner Losh <imp@FreeBSD.org> AuthorDate: 2023-11-29 01:49:01 +0000 Commit: Alexander Motin <mav@FreeBSD.org> CommitDate: 2024-01-19 17:16:49 +0000 mpi3mr: Remove unused fields in struct mpi3mr_cmd All of these fields are either unused, or just initialized. Remove them. This saves about 1MB of memory for the cards that I have which can do 8k transactions at once. Sponsored by: Netflix Reviewed by: mav, jhb Differential Revision: https://reviews.freebsd.org/D42538 (cherry picked from commit a2b046620c54db977196128b3c53da2704b9fd20) --- sys/dev/mpi3mr/mpi3mr.c | 3 --- sys/dev/mpi3mr/mpi3mr.h | 6 ------ 2 files changed, 9 deletions(-) diff --git a/sys/dev/mpi3mr/mpi3mr.c b/sys/dev/mpi3mr/mpi3mr.c index 592b0f02cdd7..7bb834430dbc 100644 --- a/sys/dev/mpi3mr/mpi3mr.c +++ b/sys/dev/mpi3mr/mpi3mr.c @@ -4986,12 +4986,9 @@ mpi3mr_get_command(struct mpi3mr_softc *sc) cmd->data_dir = 0; cmd->ccb = NULL; cmd->targ = NULL; - cmd->max_segs = 0; - cmd->lun = 0; cmd->state = MPI3MR_CMD_STATE_BUSY; cmd->data = NULL; cmd->length = 0; - cmd->out_len = 0; out: mtx_unlock(&sc->cmd_pool_lock); return cmd; diff --git a/sys/dev/mpi3mr/mpi3mr.h b/sys/dev/mpi3mr/mpi3mr.h index 1dc680beb47e..2226c747d3cf 100644 --- a/sys/dev/mpi3mr/mpi3mr.h +++ b/sys/dev/mpi3mr/mpi3mr.h @@ -457,19 +457,13 @@ struct mpi3mr_cmd { union ccb *ccb; void *data; u_int length; - u_int out_len; - struct uio uio; - struct iovec iovec[MPI3MR_IOVEC_COUNT]; - u_int max_segs; struct mpi3mr_target *targ; - u_int lun; u_int data_dir; u_int state; bus_dmamap_t dmamap; struct scsi_sense_data *sense; struct callout callout; bool callout_owner; - mpi3mr_cmd_callback_t *timeout_handler; U16 hosttag; U8 req_qidx; Mpi3SCSIIORequest_t io_request;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202401191717.40JHHUIw096802>