Received: by 10.192.165.148 with SMTP id m20csp296977imm; Tue, 24 Apr 2018 22:51:39 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/nvo8DpGa1aJuSy7ei6UflP8v18pXzMemImqdwsoSQ/Wfa0gRdOAk11dG40Zmp7YJxSAIb X-Received: by 10.99.7.86 with SMTP id 83mr7376595pgh.211.1524635499604; Tue, 24 Apr 2018 22:51:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524635499; cv=none; d=google.com; s=arc-20160816; b=CVOK+5b29q8USG7MZ0kqggFjLBrL+G8VPdV7uZiqYhdtJuuJtdcUYkLTwL18o9Dul5 aTybo9t5vVOIZVX5tLo6TUBglqOaH1xndGW/Zgc7xH+b1+9LmfnWboKAkddcN6r1Cngc x+R5MG9yqTvNCI451zXFc6QlQvyRSYskU85JwYVjxea9cV1KptRGml+22ZUtRTH9Pq0C 4Gfj3QaZz1KdvGrQngC41QDvYCo7JGEfl4GLplIAec5HqoT9COotoLx/i0yAE84Xad6U eL5fgGKK8qBcwd5PMcmfB7oR38kVwfsRMdthl7zOsQtO9zlupVDKBMSOeDdPBVKhdNx/ Waqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=/d/eY22gOOVsSJgnyfKk8D4nazH0bu09jMKmhBZqTNk=; b=c2mOxz/NAHbTvTUTyAdRGWGzTzK104fILO0kEVJQ4GFKbv1XMsE3gFi5wOcxqg6hPp LNrF82raF4OfW1BCdP0Z2Mk58q2yd5kJLm8qMxMGcWEURyCtw2AQH0Yf0w1+Vpp/MBt6 l9otU2rv5aK/1uf45lo+m2DxALMNkXa9Bg+BOJ8FwGW4AZ7qoVCZ5ZciroroVZlaXDhZ lr7uuIrfU2WZUBh8B57qWPo5pFa5jBhFM5AUt8Ph44HrWABwSGkwy1KpX8Qe04KODJdb aHE6HDlOK73GujZnY01PDGyq6wbi48GN5HfZMxAPtPlfWbJGQOwDQ0Gc0WnF/XEZTahC Xy4Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k2-v6si15624893plt.406.2018.04.24.22.51.25; Tue, 24 Apr 2018 22:51:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751151AbeDYFu0 (ORCPT + 99 others); Wed, 25 Apr 2018 01:50:26 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:58752 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750882AbeDYFuY (ORCPT ); Wed, 25 Apr 2018 01:50:24 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 6167422; Wed, 25 Apr 2018 05:50:23 +0000 (UTC) Date: Wed, 25 Apr 2018 07:50:16 +0200 From: Greg Kroah-Hartman To: "Michael S. Tsirkin" Cc: linux-kernel@vger.kernel.org, Amit Shah , Arnd Bergmann , virtualization@lists.linux-foundation.org, stable@vger.kernel.org, Tiwei Bie , Jason Wang Subject: Re: [PATCH 1/6] virtio_console: don't tie bufs to a vq Message-ID: <20180425055016.GD30843@kroah.com> References: <1524248223-393618-1-git-send-email-mst@redhat.com> <1524248223-393618-2-git-send-email-mst@redhat.com> <20180421073005.GA3744@kroah.com> <20180424215318-mutt-send-email-mst@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180424215318-mutt-send-email-mst@kernel.org> User-Agent: Mutt/1.9.5 (2018-04-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 24, 2018 at 09:56:33PM +0300, Michael S. Tsirkin wrote: > On Sat, Apr 21, 2018 at 09:30:05AM +0200, Greg Kroah-Hartman wrote: > > On Fri, Apr 20, 2018 at 09:18:01PM +0300, Michael S. Tsirkin wrote: > > > an allocated buffer doesn't need to be tied to a vq - > > > only vq->vdev is ever used. Pass the function the > > > just what it needs - the vdev. > > > > > > Signed-off-by: Michael S. Tsirkin > > > --- > > > drivers/char/virtio_console.c | 14 +++++++------- > > > 1 file changed, 7 insertions(+), 7 deletions(-) > > > > > > diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c > > > index 468f061..3e56f32 100644 > > > --- a/drivers/char/virtio_console.c > > > +++ b/drivers/char/virtio_console.c > > > @@ -422,7 +422,7 @@ static void reclaim_dma_bufs(void) > > > } > > > } > > > > > > -static struct port_buffer *alloc_buf(struct virtqueue *vq, size_t buf_size, > > > +static struct port_buffer *alloc_buf(struct virtio_device *vdev, size_t buf_size, > > > int pages) > > > { > > > struct port_buffer *buf; > > > @@ -445,16 +445,16 @@ static struct port_buffer *alloc_buf(struct virtqueue *vq, size_t buf_size, > > > return buf; > > > } > > > > > > - if (is_rproc_serial(vq->vdev)) { > > > + if (is_rproc_serial(vdev)) { > > > /* > > > * Allocate DMA memory from ancestor. When a virtio > > > * device is created by remoteproc, the DMA memory is > > > * associated with the grandparent device: > > > * vdev => rproc => platform-dev. > > > */ > > > - if (!vq->vdev->dev.parent || !vq->vdev->dev.parent->parent) > > > + if (!vdev->dev.parent || !vdev->dev.parent->parent) > > > goto free_buf; > > > - buf->dev = vq->vdev->dev.parent->parent; > > > + buf->dev = vdev->dev.parent->parent; > > > > > > /* Increase device refcnt to avoid freeing it */ > > > get_device(buf->dev); > > > @@ -838,7 +838,7 @@ static ssize_t port_fops_write(struct file *filp, const char __user *ubuf, > > > > > > count = min((size_t)(32 * 1024), count); > > > > > > - buf = alloc_buf(port->out_vq, count, 0); > > > + buf = alloc_buf(port->portdev->vdev, count, 0); > > > if (!buf) > > > return -ENOMEM; > > > > > > @@ -957,7 +957,7 @@ static ssize_t port_fops_splice_write(struct pipe_inode_info *pipe, > > > if (ret < 0) > > > goto error_out; > > > > > > - buf = alloc_buf(port->out_vq, 0, pipe->nrbufs); > > > + buf = alloc_buf(port->portdev->vdev, 0, pipe->nrbufs); > > > if (!buf) { > > > ret = -ENOMEM; > > > goto error_out; > > > @@ -1374,7 +1374,7 @@ static unsigned int fill_queue(struct virtqueue *vq, spinlock_t *lock) > > > > > > nr_added_bufs = 0; > > > do { > > > - buf = alloc_buf(vq, PAGE_SIZE, 0); > > > + buf = alloc_buf(vq->vdev, PAGE_SIZE, 0); > > > if (!buf) > > > break; > > > > > > -- > > > MST > > > > > > > > This is not the correct way to submit patches for inclusion in the > > stable kernel tree. Please read: > > https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html > > for how to do this properly. > > > > > > > Thanks! > I have some questions about this one: > > Cc: # 3.3.x: a1f84a3: sched: Check for idle > Cc: # 3.3.x: 1b9508f: sched: Rate-limit newidle > Cc: # 3.3.x: fd21073: sched: Fix affinity logic > Cc: # 3.3.x > Signed-off-by: Ingo Molnar > > 1. what does the kernel version mean? can I omit it? Did you read the document?, it explains that the version can be used to say "this kernel version and newer" > 2. so when I rebase to add the tag, this changes commit IDs for > following tags in the same tree, breaking their tags > in the process. Pretty annoying. Any idea how to do it better? You only put tags there if you want me to pick up pre-requisite patches that are already in Linus's tree. If you have a patch series that all needs to go into stable, just add the "cc: stable@" to the tags on all of them and I'll pick them up in the correct order then. hope this helps, greg k-h