qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Maxim Levitsky <mlevitsk@redhat.com>
To: Minwoo Im <minwoo.im.dev@gmail.com>, Klaus Jensen <its@irrelevant.dk>
Cc: Fam Zheng <fam@euphon.net>, Kevin Wolf <kwolf@redhat.com>,
	qemu-block@nongnu.org, Klaus Jensen <k.jensen@samsung.com>,
	qemu-devel@nongnu.org, Max Reitz <mreitz@redhat.com>,
	Andrzej Jakowski <andrzej.jakowski@linux.intel.com>,
	Keith Busch <kbusch@kernel.org>
Subject: Re: [PATCH v2 14/16] hw/block/nvme: consolidate qsg/iov clearing
Date: Thu, 30 Jul 2020 14:02:23 +0300	[thread overview]
Message-ID: <1e40f18a915d1e052468773e603f12a68ca12b44.camel@redhat.com> (raw)
In-Reply-To: <20200730103117.5f7pd6cv3vgqh2mx@localhost.localdomain>

On Thu, 2020-07-30 at 19:31 +0900, Minwoo Im wrote:
> On 20-07-30 00:06:36, Klaus Jensen wrote:
> > From: Klaus Jensen <k.jensen@samsung.com>
> > 
> > Always destroy the request qsg/iov at the end of request use.
> > 
> > Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
> > ---
> >  hw/block/nvme.c | 52 ++++++++++++++++++++-----------------------------
> >  1 file changed, 21 insertions(+), 31 deletions(-)
> > 
> > diff --git a/hw/block/nvme.c b/hw/block/nvme.c
> > index 3d7275eae369..045dd55376a5 100644
> > --- a/hw/block/nvme.c
> > +++ b/hw/block/nvme.c
> > @@ -217,6 +217,17 @@ static void nvme_req_clear(NvmeRequest *req)
> >      memset(&req->cqe, 0x0, sizeof(req->cqe));
> >  }
> >  
> > +static void nvme_req_exit(NvmeRequest *req)
> > +{
> > +    if (req->qsg.sg) {
> > +        qemu_sglist_destroy(&req->qsg);
> > +    }
> > +
> > +    if (req->iov.iov) {
> > +        qemu_iovec_destroy(&req->iov);
> > +    }
> > +}
> > +
> 
> Klaus,
> 
> What is differences between 'clear' and 'exit' from the request
> perspective?
> 
> Thanks,
> 
In my personal opinion, I don't think the name matters that much here.

Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com>

Best regards,
	Maxim Levitsky



  reply	other threads:[~2020-07-30 11:03 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-29 22:06 [PATCH v2 00/16] hw/block/nvme: dma handling and address mapping cleanup Klaus Jensen
2020-07-29 22:06 ` [PATCH v2 01/16] hw/block/nvme: memset preallocated requests structures Klaus Jensen
2020-07-30 10:14   ` Minwoo Im
2020-07-29 22:06 ` [PATCH v2 02/16] hw/block/nvme: add mapping helpers Klaus Jensen
2020-07-29 22:06 ` [PATCH v2 03/16] hw/block/nvme: replace dma_acct with blk_acct equivalent Klaus Jensen
2020-07-29 22:06 ` [PATCH v2 04/16] hw/block/nvme: remove redundant has_sg member Klaus Jensen
2020-07-30 10:15   ` Minwoo Im
2020-07-30 10:43   ` Maxim Levitsky
2020-07-29 22:06 ` [PATCH v2 05/16] hw/block/nvme: destroy request iov before reuse Klaus Jensen
2020-07-30 10:16   ` Minwoo Im
2020-07-30 10:43   ` Maxim Levitsky
2020-07-29 22:06 ` [PATCH v2 06/16] hw/block/nvme: refactor dma read/write Klaus Jensen
2020-07-29 22:06 ` [PATCH v2 07/16] hw/block/nvme: add tracing to nvme_map_prp Klaus Jensen
2020-07-30 10:17   ` Minwoo Im
2020-07-30 10:45   ` Maxim Levitsky
2020-07-29 22:06 ` [PATCH v2 08/16] hw/block/nvme: add request mapping helper Klaus Jensen
2020-07-30 10:19   ` Minwoo Im
2020-07-29 22:06 ` [PATCH v2 09/16] hw/block/nvme: verify validity of prp lists in the cmb Klaus Jensen
2020-07-29 22:06 ` [PATCH v2 10/16] hw/block/nvme: refactor request bounds checking Klaus Jensen
2020-07-29 22:06 ` [PATCH v2 11/16] hw/block/nvme: add check for mdts Klaus Jensen
2020-07-29 22:06 ` [PATCH v2 12/16] hw/block/nvme: be consistent about zeros vs zeroes Klaus Jensen
2020-07-29 22:06 ` [PATCH v2 13/16] hw/block/nvme: add ns/cmd references in NvmeRequest Klaus Jensen
2020-07-29 22:06 ` [PATCH v2 14/16] hw/block/nvme: consolidate qsg/iov clearing Klaus Jensen
2020-07-30 10:31   ` Minwoo Im
2020-07-30 11:02     ` Maxim Levitsky [this message]
2020-07-30 11:09     ` Klaus Jensen
2020-07-30 12:26       ` Minwoo Im
2020-07-29 22:06 ` [PATCH v2 15/16] hw/block/nvme: use preallocated qsg/iov in nvme_dma_prp Klaus Jensen
2020-07-30 10:29   ` Minwoo Im
2020-07-29 22:06 ` [PATCH v2 16/16] hw/block/nvme: remove explicit qsg/iov parameters Klaus Jensen
2020-07-30 10:30   ` Minwoo Im
2020-07-30 11:03   ` Maxim Levitsky
2020-08-17  6:45 ` [PATCH v2 00/16] hw/block/nvme: dma handling and address mapping cleanup Klaus Jensen

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=1e40f18a915d1e052468773e603f12a68ca12b44.camel@redhat.com \
    --to=mlevitsk@redhat.com \
    --cc=andrzej.jakowski@linux.intel.com \
    --cc=fam@euphon.net \
    --cc=its@irrelevant.dk \
    --cc=k.jensen@samsung.com \
    --cc=kbusch@kernel.org \
    --cc=kwolf@redhat.com \
    --cc=minwoo.im.dev@gmail.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).