Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp929957imu; Sat, 15 Dec 2018 10:06:27 -0800 (PST) X-Google-Smtp-Source: AFSGD/VfypeV6xyBPJyDAClWtQVXMLFrHh87JuGyFlZS9Oc+83vOAp3D5IlmBIInXtXiEmAQPZXB X-Received: by 2002:a62:8949:: with SMTP id v70mr7045804pfd.85.1544897187030; Sat, 15 Dec 2018 10:06:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544897186; cv=none; d=google.com; s=arc-20160816; b=Ra7j1zkIn2kH1Qf6LjTFMSnvIKJE6Au0nIKzA35Dlq80V3Nbkal8f9eyVW5CsWSkJK nUc9xPPQQCVU7GfKKbpACYn/1kce1jfN1fflxfO6gB9RN4ewzEIDeov8+g/GQSKxswVx GvUVo2Tf+aJsHXb14hn5aO1UGI2afi4BNwX/VDIm6/H8Sun0vn28PZqV9EJ7rgmA/hFr Z8bb9NxH7v9igYSq08PLRRMO8ehd8fafOsP0KV7pWLh/WV4xB/1KVaE7SZ20xN0RcU/l 4Z2S+ZlBl8HfhLuh4aGCVoTP1/xqZv2NR9H794etbD1dGv3E0Yq+MbaG4SsDrB+GUvBg sywA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=dSiMOrA4+DlJ2BEwc2oj26pSU0kk7ZXYrP3NX0kUpE0=; b=gR6Jc2p7PRxZybbhx8CAiaCkm9QqBnuTRi56XB/WID05uknZR0nZWkr8MbbggpRunx tmyON9OldhlqbiTv1WfyEvGH2niCwiBfAu0B2ud1NTRMC8rMDJMiPZuNon6DiKXSd3d2 0RjzYkdAO9YUSPAJiT6zqG7iXiDGVFhPBLoyMuXpucELKj2DGwCZaQaxFcc08q5YQUJD +y1lXhW/W+2uTFotxJXIkPyvztvTQSx5udSgU8El+9pxOenUVz+S4UfcWZNbDUgzPW0J Cj88oN6jws1EIitzs1mp+u+c6PzkwDiYl/sWcugrdK7pF+8LlpNZ49FxQZf8KWrNDRhM zyvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=clTOvd5Z; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r25si7290547pfk.28.2018.12.15.10.05.57; Sat, 15 Dec 2018 10:06:26 -0800 (PST) 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; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=clTOvd5Z; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729631AbeLOSBU (ORCPT + 99 others); Sat, 15 Dec 2018 13:01:20 -0500 Received: from casper.infradead.org ([85.118.1.10]:54886 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729270AbeLOSBT (ORCPT ); Sat, 15 Dec 2018 13:01:19 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:Content-Type: MIME-Version:References:In-Reply-To:Message-ID:Subject:Cc:To:From:Date:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=dSiMOrA4+DlJ2BEwc2oj26pSU0kk7ZXYrP3NX0kUpE0=; b=clTOvd5ZiwN9g1nXKPaMZxlQDY OZHtpAUehEwQE46n8ZsUeVp9UfggFoKLg77F/wek9eHxUjNhPKKnUJUNfqyombG1aWtRMH3ki0Xxf sPr+vjQgBHfrLBjaeqg4T2GkEmLgVxSB2Lj3SEOZGqznxsAeMVM5mLIEzAU/vukJJ1PYCOh34c0Qp 2vsgxuCiOsP6Ib8BMLOolVbrnAz4joUqvf/UiYhs+qzLZL9L6eIUvbLDSC44/mVWhXBAP7OUSysTG 6b6TxbxR6gDHQ3hGlGHc1QjXXi3v1RuoQJpOEOuIIKFo3jugrd1HpTSOKvmWl7duq8JnKOMUt5+3Z 1oNq2dyw==; Received: from 177.96.232.231.dynamic.adsl.gvt.net.br ([177.96.232.231] helo=coco.lan) by casper.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1gYEFY-000323-Em; Sat, 15 Dec 2018 18:01:16 +0000 Date: Sat, 15 Dec 2018 16:01:10 -0200 From: Mauro Carvalho Chehab To: "Lucas A. M. =?UTF-8?B?TWFnYWxow6Nlcw==?=" Cc: linux-media@vger.kernel.org, helen.koike@collabora.com, hverkuil@xs4all.nl, lkcamp@lists.libreplanetbr.org, linux-kernel@vger.kernel.org Subject: Re: [Lkcamp][PATCH] media: vimc: Add vimc-streamer for stream control Message-ID: <20181215160110.1a353219@coco.lan> In-Reply-To: <20181215164631.8623-1-lucmaga@gmail.com> References: <20181215164631.8623-1-lucmaga@gmail.com> X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Lucas, Em Sat, 15 Dec 2018 14:46:31 -0200 Lucas A. M. Magalh=C3=A3es escreveu: > The previous code pipeline used the stack to walk on the graph and > process a frame. Basically the vimc-sensor entity starts a thread that > generates the frames and calls the propagate_process function to send > this frame to each entity linked with a sink pad. The propagate_process > will call the process_frame of the entities which will call the > propagate_frame for each one of it's sink pad. This cycle will continue > until it reaches a vimc-capture entity that will finally return and > unstack. I didn't review the code yet, but I have a few comments about the way you're describing this patch. When you mention about a "previous code pipeline". Well, by adding it at the main body of the patch description, reviewers should expect that you're mentioning an implementation that already reached upstream. I suspect that this is not the case here, as I don't think we merged any recursive algorithm using the stack, as this is something that we shouldn't do at Kernelspace, as a 4K stack is usually not OK with recursive algorithms. So, it seems that this entire patch description (as-is) is bogus[1]. [1] if this is not the case and a recursive approach was indeed sneaked into the Kernel, this is a bug. So, you should really use the "Fixes:" meta-tag indicating what changeset this patch is fixing, and a "Cc: stable@vger.kernel.org", in order to hint stable maintainers that this require backports. Please notice that the patch description will be stored forever at the git tree. Mentioning something that were never merged (and that, years from now people will hardly remember, and will have lots of trouble to seek as you didn't even mentioned any ML archive with the past solution) shouldn't be done. So, you should rewrite the entire patch description explaining what the current approach took by this patch does. Then, in order to make easier for reviewers to compare with a previous implementation, you can add a "---" line and then a description about why this approach is better than the first version, e. g. something like: [PATCH v2] media: vimc: Add vimc-streamer for stream control Add a logic that will create a linear pipeline walking=20 backwards on the graph. When the stream starts it will simply loop through the pipeline calling the respective process_frame function for each entity on the pipeline. Signed-off-by: Your Name --- v2: The previous approach were to use a recursive function that it was using the stack to walk on the graph and process a frame. Basically the vimc-sensor entity starts a thread that generates the frames and calls the propagate_process function to send this frame to each entity linked with a sink pad. The propagate_process will call the process_frame of the entities which will call the propagate_frame for each one of it's sink pad. This cycle will continue until it reaches a vimc-capture entity that will finally return and unstack. ... If the past approach was written by somebody else (or if you sent it a long time ago), please add an URL (if possible using=20 https://lore.kernel.org/linux-media/ archive) pointing to the previous=20 approach, in order to help us to check what you're referring to. Regards, Mauro Thanks, Mauro