From: "Michael S. Tsirkin" <mst@redhat.com>
To: Denys Vlasenko <dvlasenk@redhat.com>
Cc: virtualization@lists.linux-foundation.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drivers/virtio/virtio_ring.c: Deinline virtqueue_add, save 1016 bytes
Date: Sat, 9 Apr 2016 23:14:37 +0300 [thread overview]
Message-ID: <20160409231155-mutt-send-email-mst@redhat.com> (raw)
In-Reply-To: <1460141926-13069-3-git-send-email-dvlasenk@redhat.com>
On Fri, Apr 08, 2016 at 08:58:44PM +0200, Denys Vlasenko wrote:
> This function compiles to 839 bytes of machine code.
> In C, it is ~150 lines long.
>
> This function has 3 callsites.
>
> Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
> CC: "Michael S. Tsirkin" <mst@redhat.com>
> CC: virtualization@lists.linux-foundation.org
> CC: linux-kernel@vger.kernel.org
This function is one of the most performance critical ones in the driver, a
bunch of tuning went into it, making this inline intentionally. I'd
have to see some numbers showing making it non-inline is a worth-while
tradeoff.
> ---
> drivers/virtio/virtio_ring.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c
> index e12e385..77a4771 100644
> --- a/drivers/virtio/virtio_ring.c
> +++ b/drivers/virtio/virtio_ring.c
> @@ -126,7 +126,7 @@ static struct vring_desc *alloc_indirect(struct virtqueue *_vq,
> return desc;
> }
>
> -static inline int virtqueue_add(struct virtqueue *_vq,
> +static int virtqueue_add(struct virtqueue *_vq,
> struct scatterlist *sgs[],
> unsigned int total_sg,
> unsigned int out_sgs,
> --
> 2.1.0
next prev parent reply other threads:[~2016-04-09 20:14 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-08 18:58 [PATCH] drivers/infiniband/hw/nes/nes_verbs.c: Deinline nes_free_qp_mem, save 1072 bytes Denys Vlasenko
2016-04-08 18:58 ` [PATCH] drivers/scsi/fnic/fnic_scsi.c: Deinline fnic_queue_abort_io_req, save 1792 bytes Denys Vlasenko
2016-04-08 19:08 ` Laurence Oberman
2016-04-12 2:16 ` Martin K. Petersen
2016-04-08 18:58 ` [PATCH] drivers/virtio/virtio_ring.c: Deinline virtqueue_add, save 1016 bytes Denys Vlasenko
2016-04-09 20:14 ` Michael S. Tsirkin [this message]
2016-04-08 18:58 ` [PATCH] fs/gfs2/glock.c: Deinline do_error, save 1856 bytes Denys Vlasenko
2016-04-08 19:17 ` Bob Peterson
2016-04-08 19:46 ` Denys Vlasenko
2016-04-12 16:49 ` Bob Peterson
2016-04-08 18:58 ` [PATCH] lockdep: Deinline register_lock_class, save 2328 bytes Denys Vlasenko
2016-04-13 11:28 ` [tip:locking/core] locking/lockdep: Deinline register_lock_class(), " tip-bot for Denys Vlasenko
2016-04-11 4:41 ` [PATCH] drivers/infiniband/hw/nes/nes_verbs.c: Deinline nes_free_qp_mem, save 1072 bytes Leon Romanovsky
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=20160409231155-mutt-send-email-mst@redhat.com \
--to=mst@redhat.com \
--cc=dvlasenk@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=virtualization@lists.linux-foundation.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