Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp766309ybb; Wed, 8 Apr 2020 09:28:22 -0700 (PDT) X-Google-Smtp-Source: APiQypI1XIjKDMVHYmcLJpGOftTdgLE5cja9gnVcc4PsEIg8CvB2OR5kmZtvAq6hwV0//Fj5CgCQ X-Received: by 2002:a9d:1a3:: with SMTP id e32mr6542036ote.206.1586363302792; Wed, 08 Apr 2020 09:28:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586363302; cv=none; d=google.com; s=arc-20160816; b=UGLAJn+aMaKc5hIZ09nC4sUoL9wTGaBdD4zlEkjkTBZQQlsNZ0+XJfAPpYNEiVkVih iH6IY6EEDOXVS8J17qpAzQF1IUy8dN2x2IqtTt3lB3J0WIVuWybvZxCF82W81AJaoOcS J6XIkwXqR58Jl//N98y4IcEoDiHL2br8fDK/bo//DRU/asNsp3ovriwQvUeQZzFxdt+E 2l1jLk1yROPV9E11PAtAdtsR30yfJ1yUXWCRr2KhLs952Xt/mKpQg9KNI4wtyksm/xQ1 cSeoNpSUUeZty1NqTjIz3IBDVqPYUoIgMxR6QuVM0+QQXcl3UQIYRR9dL0a1bvsWZ69P D2uQ== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=Jf0MyvNrfZeSllBWGHedtbc9gbfyY6waAa4WK3aei6c=; b=ymO9A7rSTK0IDxy5ifryOeipSHIfel9ASs0zFkpinFy/945v6ooUfT6q8VNs3Gf+hX G98tUCuQr0F/IEBGenUg/bwU31GVKniH/OQOlpk3CduHYK24R47J4wsdVErrT7zDugML +Y022F6Gk1VjAPA5zeKco4Lob/bnIk2wo0BjWn43/0GWmvuUNaZU+pztRBmuQceOS/Dk KyngM40pRMPV8WGGq9ecQY4tswtu/3DJKfiNoDBErhLgFc7hfc5ijAOmFaX+yBNpysGj srxgzftScJWQYH6/cQKIftyjsE4Ow6FUbgdDzWQ9VBc2LS7O91BV/hu4S8qu9YROXeUK sQOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="BOgb6KT/"; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c9si3598713ots.110.2020.04.08.09.28.10; Wed, 08 Apr 2020 09:28:22 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b="BOgb6KT/"; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728613AbgDHOVr (ORCPT + 99 others); Wed, 8 Apr 2020 10:21:47 -0400 Received: from mail-lf1-f67.google.com ([209.85.167.67]:44884 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727486AbgDHOVr (ORCPT ); Wed, 8 Apr 2020 10:21:47 -0400 Received: by mail-lf1-f67.google.com with SMTP id 131so5226841lfh.11; Wed, 08 Apr 2020 07:21:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=Jf0MyvNrfZeSllBWGHedtbc9gbfyY6waAa4WK3aei6c=; b=BOgb6KT/XVKYSez/v8+1A9WWPBbubsoob5g6qXsuZVeNs532Z9I6fM8sF6fB8xghkY qP+dEBTK3mVa/tcTlHZM3L5qk2jePUvTQe1EPBVKBd33p1Xhlj+y6CbsghxHEgOzv94M ZbYM+/4LONvDQQCWBTTnaHppKB2T4SUourtCjXjhuDoaaWfkOlIwK1zkdJGHcvQl6w9h Rspvj2ZULbLC2F7ZLyhVDwX0sfTOrnJp23EJi2YOYjm80+kmfuPFnz/CUVaRvR+Xc7gB I+96QbxW8VNPc3bqnM6bQlwDWYsGuGiW8f+Wp3F7wyZ6Jv/bkjTyplevyjSjtwaJV+I9 nh+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=Jf0MyvNrfZeSllBWGHedtbc9gbfyY6waAa4WK3aei6c=; b=WTayKLloEeaC3ujWOb43MQ5a3oojmf4c9rNljAT6aLJm+mtjwVlXoTu0L/t8OKnra+ P6ERGX2U7F7X8kOnqGiKrsTSlPx64tao/Zj1/bqpxsCKXh5AqJIBFlQ58xwf232kYaVJ JKwSfp9M6uQ5qATcdyD0P0irk0xPeazDZ1YX9czzzhr6wQHJyg+b9gpft2+u6Qu+xa2z twvWljQDLapS7I7a9G4PBJRd821LjNKWX0u5aQEcGxSnsmHGlLSwFqDIlvAH5PLBUfLi BlOgI3xTUstb6rB+34E4NKzx2Jm1kEHShRMHjduP0MFtZkeUoQasbJKQ1pFaTAdaSaSN 0y3Q== X-Gm-Message-State: AGi0Pub+E6AL4WNq+9zipRmww28Qv2974nn9LoSa7anUUC8KxzZDZ2Wa yEyD2/Ew/iUlF2mA4Exq9cdXSBXg X-Received: by 2002:ac2:58d7:: with SMTP id u23mr4817315lfo.182.1586355701563; Wed, 08 Apr 2020 07:21:41 -0700 (PDT) Received: from [192.168.2.145] (ppp91-78-208-152.pppoe.mtu-net.ru. [91.78.208.152]) by smtp.googlemail.com with ESMTPSA id v9sm13821994ljv.82.2020.04.08.07.21.39 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 08 Apr 2020 07:21:40 -0700 (PDT) Subject: Re: [RFC PATCH v6 6/9] media: tegra: Add Tegra210 Video input driver To: Sowjanya Komatineni , thierry.reding@gmail.com, jonathanh@nvidia.com, frankc@nvidia.com, hverkuil@xs4all.nl, sakari.ailus@iki.fi, helen.koike@collabora.com Cc: sboyd@kernel.org, linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-clk@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org References: <1585963507-12610-1-git-send-email-skomatineni@nvidia.com> <08cd31d5-e8b9-4d3a-fb0e-0e4462947d96@nvidia.com> <12a834ac-52b1-6dc0-7d3a-3e6a1fa85a2a@gmail.com> <760d071e-0cbc-b3eb-9231-fb9f9ecb44a6@nvidia.com> <9e317f65-8a02-3b15-cfec-8e0d8374130e@gmail.com> <97b35910-4c93-123a-43a0-eb14476ed0f3@nvidia.com> <84ad4e2d-6ac1-e1f4-1c55-5edaae850631@nvidia.com> <15a879b3-8fb9-6821-3cdc-104ba583ac12@gmail.com> <0c425505-347f-7418-af7e-d121fe0d06dc@nvidia.com> <1a31cd60-739f-0660-1c45-31487d2f2128@nvidia.com> <603084a5-249a-4fe2-3646-e9335ef9ab43@nvidia.com> <7895b9c6-f27d-8939-73d7-67d785e1a8b7@nvidia.com> From: Dmitry Osipenko Message-ID: Date: Wed, 8 Apr 2020 17:21:39 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 08.04.2020 03:00, Sowjanya Komatineni пишет: ... >>>>> I suppose that taking a shot takes at least few milliseconds, which >>>>> should be unacceptable to waste. >>>> As long as buffers are in queue we have to keep processing each >>>> buffer and between buffers obviously we have to wait for previous >>>> frames to finish and this why we have separate thread for frame >>>> finish where we can have next buffer capture ready and issue while >>>> previous frame memory write happens >> Also we specified numbers buffers as 3 to vb2 queue. So this is rare >> case but to prevent issuing more than 2 at a time as VI HW is only >> double buffered and syncpt fifo max depth is 2 added this to be safer. > > To be more clear, when more buffers are enqueued from userspace always > capture list will be full and thread will be busy in capture till either > error or stop stream request happens. > If kthreads take more than 1% of CPU time during capture (video) with more than 2 buffers in queue, then it's not good and I think you should do something about it. If kthreads stay at ~0%, then it should be okay as-is.