linux-remoteproc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
To: Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: kvm@vger.kernel.org, linux-remoteproc@vger.kernel.org,
	virtualization@lists.linux-foundation.org,
	sound-open-firmware@alsa-project.org,
	Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
	Liam Girdwood <liam.r.girdwood@linux.intel.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	Jason Wang <jasowang@redhat.com>,
	Ohad Ben-Cohen <ohad@wizery.com>,
	Bjorn Andersson <bjorn.andersson@linaro.org>
Subject: Re: [RFC 11/12] rpmsg: increase buffer size and reduce buffer number
Date: Fri, 5 Jun 2020 08:37:18 +0200	[thread overview]
Message-ID: <20200605063718.GB32302@ubuntu> (raw)
In-Reply-To: <20200604195839.GA26734@xps15>

Hi Mathieu,

On Thu, Jun 04, 2020 at 01:58:39PM -0600, Mathieu Poirier wrote:
> Hi Guennadi,
> 
> On Fri, May 29, 2020 at 09:37:21AM +0200, Guennadi Liakhovetski wrote:
> > It is hard to imagine use-cases where 512 buffers would really be
> > needed, whereas 512 bytes per buffer might be too little. Change this
> > to use 16 16KiB buffers instead.
> > 
> > Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
> > ---
> >  include/linux/virtio_rpmsg.h | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/include/linux/virtio_rpmsg.h b/include/linux/virtio_rpmsg.h
> > index 679be8b..1add468 100644
> > --- a/include/linux/virtio_rpmsg.h
> > +++ b/include/linux/virtio_rpmsg.h
> > @@ -72,8 +72,8 @@ enum rpmsg_ns_flags {
> >   * can change this without changing anything in the firmware of the remote
> >   * processor.
> >   */
> > -#define MAX_RPMSG_NUM_BUFS	512
> > -#define MAX_RPMSG_BUF_SIZE	512
> > +#define MAX_RPMSG_NUM_BUFS	(512 / 32)
> > +#define MAX_RPMSG_BUF_SIZE	(512 * 32)
> 
> These have been a standard in the rpmsg protocol since the inception of the
> subsystem 9 years ago and can't be changed without serious impact to existing
> implementations.

Yes, I expected this to raise complaints. I just modified them to be able to 
run my code, but a better solution is needed for sure.

> I suggest to dynamically set the number and size of the buffers to use
> based on the value of virtio_device_id::device.  To do that please spin
> off a new function, something like rpmsg_get_buffer_size(), and in there use
> the device ID to fetch the numbers based on vdev->id->device.  That way the
> rpmsg driver can be used by multiple clients and the specifics of the buffers
> adjusted without impact to other users.

I'll look into this!

Thanks
Guennadi

> Thanks,
> Mathieu
> 
> >  
> >  /* Address 53 is reserved for advertising remote services */
> >  #define RPMSG_NS_ADDR		53
> > -- 
> > 1.9.3
> > 

  reply	other threads:[~2020-06-05  6:37 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-29  7:37 [RFC 00/12] Audio DSP VirtIO and vhost drivers Guennadi Liakhovetski
2020-05-29  7:37 ` [RFC 01/12] ASoC: add function parameters to enable forced path pruning Guennadi Liakhovetski
2020-05-29  7:37 ` [RFC 02/12] ASoC: SOF: extract firmware-related operation into a function Guennadi Liakhovetski
2020-05-29  7:37 ` [RFC 03/12] ASoC: SOF: support IPC with immediate response Guennadi Liakhovetski
2020-05-29  7:37 ` [RFC 04/12] ASoC: SOF: add a power status IPC Guennadi Liakhovetski
2020-05-29  7:37 ` [RFC 05/12] ASoC: SOF: add two helper lookup functions Guennadi Liakhovetski
2020-05-29  7:37 ` [RFC 06/12] ASoC: SOF: add an RPMsg VirtIO DSP driver Guennadi Liakhovetski
2020-05-29  7:37 ` [RFC 07/12] ASoC: SOF: use a macro instead of a hard-coded value Guennadi Liakhovetski
2020-05-29  7:37 ` [RFC 08/12] ASoC: SOF: add a vhost driver: sound part Guennadi Liakhovetski
2020-05-29  7:37 ` [RFC 09/12] ASoC: SOF: VirtIO: free guest pipelines upon termination Guennadi Liakhovetski
2020-05-29  7:37 ` [RFC 10/12] vhost: add an SOF Audio DSP driver Guennadi Liakhovetski
2020-05-29  7:37 ` [RFC 11/12] rpmsg: increase buffer size and reduce buffer number Guennadi Liakhovetski
2020-06-04 19:58   ` Mathieu Poirier
2020-06-05  6:37     ` Guennadi Liakhovetski [this message]
2020-05-29  7:37 ` [RFC 12/12] rpmsg: add a device ID to also bind to the ADSP device Guennadi Liakhovetski
2020-06-04 20:01   ` Mathieu Poirier
2020-06-05  6:46     ` Guennadi Liakhovetski
2020-06-08 16:17       ` Mathieu Poirier
2020-06-08 17:02         ` Guennadi Liakhovetski
2020-06-09 16:26           ` Mathieu Poirier

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=20200605063718.GB32302@ubuntu \
    --to=guennadi.liakhovetski@linux.intel.com \
    --cc=bjorn.andersson@linaro.org \
    --cc=jasowang@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=liam.r.girdwood@linux.intel.com \
    --cc=linux-remoteproc@vger.kernel.org \
    --cc=mathieu.poirier@linaro.org \
    --cc=mst@redhat.com \
    --cc=ohad@wizery.com \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=sound-open-firmware@alsa-project.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;
as well as URLs for NNTP newsgroup(s).