From: Rusty Russell <rusty@rustcorp.com.au>
To: Amit Shah <amit.shah@redhat.com>
Cc: "Arnd Bergmann" <arnd@arndb.de>,
"Michael S. Tsirkin" <mst@redhat.com>,
sjurbren@stericsson.com, linux-kernel@vger.kernel.org,
virtualization@lists.linux-foundation.org,
"Linus Walleij" <linus.walleij@linaro.org>,
"Sjur Brændeland" <sjur.brandeland@stericsson.com>
Subject: Re: [PATCHv5 2/3] virtio_console: Add support for remoteproc serial
Date: Thu, 27 Sep 2012 09:22:24 +0930 [thread overview]
Message-ID: <87haqk4a13.fsf@rustcorp.com.au> (raw)
In-Reply-To: <1348580837-10919-3-git-send-email-sjur.brandeland@stericsson.com>
sjur.brandeland@stericsson.com writes:
> From: Sjur Brændeland <sjur.brandeland@stericsson.com>
>
> Add a simple serial connection driver called
> VIRTIO_ID_RPROC_SERIAL (11) for communicating with a
> remote processor in an asymmetric multi-processing
> configuration.
>
...
> static struct port_buffer *alloc_buf(struct virtqueue *vq, size_t buf_size,
> int nrbufs)
> {
> struct port_buffer *buf;
> size_t alloc_size;
>
> + if (is_rproc_serial(vq->vdev) && !irqs_disabled())
> + reclaim_dma_bufs();
Hmm, you need a gfp_t arg into alloc_buf; your last patch simply changed
them all to GFP_ATOMIC, which makes the console far less memory
friendly.
You check !irqs_disabled() in a couple of places; I think the caller
needs to indicate (possibly by checking for gfp == GFP_KERNEL) whether
it's safe to call reclaim_dma_bufs().
> @@ -838,6 +927,10 @@ static ssize_t port_fops_splice_write(struct pipe_inode_info *pipe,
> .u.data = &sgl,
> };
>
> + /* rproc_serial does not support splice */
> + if (is_rproc_serial(port->out_vq->vdev))
> + return -EINVAL;
Why not? ;)
Thanks,
Rusty.
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
WARNING: multiple messages have this Message-ID (diff)
From: Rusty Russell <rusty@rustcorp.com.au>
To: sjur.brandeland@stericsson.com, Amit Shah <amit.shah@redhat.com>
Cc: linux-kernel@vger.kernel.org,
virtualization@lists.linux-foundation.org,
sjurbren@stericsson.com,
"Sjur Brændeland" <sjur.brandeland@stericsson.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
"Ohad Ben-Cohen" <ohad@wizery.com>,
"Linus Walleij" <linus.walleij@linaro.org>,
"Arnd Bergmann" <arnd@arndb.de>
Subject: Re: [PATCHv5 2/3] virtio_console: Add support for remoteproc serial
Date: Thu, 27 Sep 2012 09:22:24 +0930 [thread overview]
Message-ID: <87haqk4a13.fsf@rustcorp.com.au> (raw)
In-Reply-To: <1348580837-10919-3-git-send-email-sjur.brandeland@stericsson.com>
sjur.brandeland@stericsson.com writes:
> From: Sjur Brændeland <sjur.brandeland@stericsson.com>
>
> Add a simple serial connection driver called
> VIRTIO_ID_RPROC_SERIAL (11) for communicating with a
> remote processor in an asymmetric multi-processing
> configuration.
>
...
> static struct port_buffer *alloc_buf(struct virtqueue *vq, size_t buf_size,
> int nrbufs)
> {
> struct port_buffer *buf;
> size_t alloc_size;
>
> + if (is_rproc_serial(vq->vdev) && !irqs_disabled())
> + reclaim_dma_bufs();
Hmm, you need a gfp_t arg into alloc_buf; your last patch simply changed
them all to GFP_ATOMIC, which makes the console far less memory
friendly.
You check !irqs_disabled() in a couple of places; I think the caller
needs to indicate (possibly by checking for gfp == GFP_KERNEL) whether
it's safe to call reclaim_dma_bufs().
> @@ -838,6 +927,10 @@ static ssize_t port_fops_splice_write(struct pipe_inode_info *pipe,
> .u.data = &sgl,
> };
>
> + /* rproc_serial does not support splice */
> + if (is_rproc_serial(port->out_vq->vdev))
> + return -EINVAL;
Why not? ;)
Thanks,
Rusty.
next prev parent reply other threads:[~2012-09-26 23:52 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-25 13:47 [PATCHv6 0/3] virtio_console: Add rproc_serial device sjur.brandeland
2012-09-25 13:47 ` sjur.brandeland
2012-09-25 13:47 ` [PATCH 1/3] virtio_console:Merge struct buffer_token into struct port_buffer sjur.brandeland
2012-09-25 13:47 ` sjur.brandeland
2012-09-26 2:44 ` Masami Hiramatsu
2012-09-26 2:44 ` Masami Hiramatsu
2012-09-26 7:48 ` Sjur BRENDELAND
2012-09-26 7:48 ` Sjur BRENDELAND
2012-09-26 9:40 ` Masami Hiramatsu
2012-09-26 9:40 ` Masami Hiramatsu
2012-09-26 23:42 ` Rusty Russell
2012-09-26 23:42 ` Rusty Russell
2012-10-01 9:39 ` Amit Shah
2012-10-01 9:39 ` Amit Shah
2012-10-01 9:35 ` Amit Shah
2012-10-01 9:35 ` Amit Shah
2012-09-25 13:47 ` [PATCHv5 2/3] virtio_console: Add support for remoteproc serial sjur.brandeland
2012-09-25 13:47 ` sjur.brandeland
2012-09-26 23:52 ` Rusty Russell [this message]
2012-09-26 23:52 ` Rusty Russell
2012-10-01 9:52 ` Amit Shah
2012-10-01 9:52 ` Amit Shah
2012-09-25 13:47 ` [PATCH 3/3] virtio_console: Don't initialize buffers to zero sjur.brandeland
2012-09-25 13:47 ` sjur.brandeland
2012-10-01 8:24 ` Amit Shah
2012-10-01 8:24 ` Amit Shah
2012-09-28 12:48 ` [PATCHv6 0/3] virtio_console: Add rproc_serial device Amit Shah
2012-09-28 12:48 ` Amit Shah
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=87haqk4a13.fsf@rustcorp.com.au \
--to=rusty@rustcorp.com.au \
--cc=amit.shah@redhat.com \
--cc=arnd@arndb.de \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mst@redhat.com \
--cc=sjur.brandeland@stericsson.com \
--cc=sjurbren@stericsson.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.