Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2525962imm; Thu, 7 Jun 2018 12:08:01 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKctjAwvpl9NnKgQWvhdpasaRJTd/TDYwgdE/9FMlbEWWu7Hy6Kkig83X908Lu7P/yFhdol X-Received: by 2002:a17:902:530e:: with SMTP id b14-v6mr3322246pli.316.1528398481486; Thu, 07 Jun 2018 12:08:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528398481; cv=none; d=google.com; s=arc-20160816; b=KP+zKqq7q5M5uBpdyBUQr5+WKKJVTLn9nRBlqiah+8m0BvYv50sflNpltsMOaZq5H1 e/tdI3aQh9umLX8pwXv6MSNAC8XUruXFZCN9bLH9BXODExdDaA66tEob2E+lYNTuX/7W y0GOVBKkXEfdPMNQHLmCNwMVaS/ejOiYWPiA2FYmglnxQkjdZCaHeHH3JASCuDqCirgx hWfsdf3VchEJ2cuv/wblnuCvkS1FUEm8Pmb4waz+kCMMwJSZV/jawrglFCEPhX62FX8B KKut6x23wMhcz/TeiyngZ1z7PXeRBNQTNxzjiMDnhFKnqrXw13JpqLwrP57CHP/kKXey a/yQ== 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:date:cc:to:from:subject:message-id :dkim-signature:arc-authentication-results; bh=LS6PmAi4sloohTRVQpI8M2Tjq0EIscUrLtDbb8awbag=; b=i0jGkfy2QFHZ1f42lm0Ih6A2Rd8F9LnAPlqb24Osg1YJ1v6sXeI5ywio/A+q6XBMf9 SMtFy5Wxj+qPmPtgk4avQyvhac8ZlB9p2zNFJPezcEtXzKtDG2NI22vGAvKHuau6aeip 9vmiH6gn/zy5yYnf0AH4Na9ubbYmxfj9esIbzmoJeCN6sZ5ZQHJiOx5zpdwCix4oWxBj Lq3cTFGZSzZiTJu47dOw0jP/QH3a0a0e0BYkc/+T4peGtrvuR+v06ognnSgbqcPWNqE6 5qcO++qKtGKxsFxPFwiWhV+e0iQMgh80NPSTkIrdUrnapw7WsmLUvtXoflTLM7YTy+Xx GE4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ndufresne-ca.20150623.gappssmtp.com header.s=20150623 header.b=jRjwOYKH; 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 71-v6si55447495plc.164.2018.06.07.12.07.47; Thu, 07 Jun 2018 12:08:01 -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=@ndufresne-ca.20150623.gappssmtp.com header.s=20150623 header.b=jRjwOYKH; 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 S935113AbeFGRxi (ORCPT + 99 others); Thu, 7 Jun 2018 13:53:38 -0400 Received: from mail-qk0-f193.google.com ([209.85.220.193]:35570 "EHLO mail-qk0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933639AbeFGRxg (ORCPT ); Thu, 7 Jun 2018 13:53:36 -0400 Received: by mail-qk0-f193.google.com with SMTP id d130-v6so7118129qkc.2 for ; Thu, 07 Jun 2018 10:53:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ndufresne-ca.20150623.gappssmtp.com; s=20150623; h=message-id:subject:from:to:cc:date:in-reply-to:references :mime-version:content-transfer-encoding; bh=LS6PmAi4sloohTRVQpI8M2Tjq0EIscUrLtDbb8awbag=; b=jRjwOYKHWlWkttqHwIMKR1JvzqKnebwp3khtUfUCygVrwlWPGm+MpUBV0z3niBg+r1 IUnu+senQXSMgiSc4mDctAX3750ZfAnioFuiorSBh3bLWL4ruvn7hFUHnA5tkUoHHQjK CusdF0UCu5isV+WpJplb4Z3P78curbwjoiD9atX1KI9lO3Qgsw+Omgvo8C6EqjOTg52p 1LSCvl0R8zaXl3RpeWaEsUtm/hbMwpiI4mhE1OSBPrvanHoe4q0AzGHoDdVEeWSQV81W noqJ/zyfXWB7Jw1DPRU8tZ+lxc9hZyDFHZ0KLqvdzoMWKkqS3Zrb8tHLcLh3mOn3/jTY kLPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:mime-version:content-transfer-encoding; bh=LS6PmAi4sloohTRVQpI8M2Tjq0EIscUrLtDbb8awbag=; b=ipAkYOVE5r1n71/HigBHKDDivz0M/aTFpbOFB1SLJM5ZnolH4nuIXJVeqsGIjWRF6/ EdtAkOGPO8vjXjBJLjj86iuHAtHqvWCludwXeWezKJKOwiGqwyIL1fJQJzoz7MuzMdRd WOwTgE6rqmMtr2x3rXH/VKebTUi88w8OXaJw6sMSgWx1z5H9q3dJRaXIud31vDud+MRk W7/92po/gQxtY5ct17I/FCMD/li+mTA1paFDPbfCFuY5civ1zXsS2uwrZS+uIALwJbgH O8ZgcPttTqe8cjHHGiUitPO3CZkuEytlZ3tBffVV3IDeOsvBVrE2sqdvdvFtDGZA+B40 411g== X-Gm-Message-State: APt69E2V987U8/Vn6+07mILjfNPEe9uJ99FrDyqW/RVBJ6NBMjWmJTh8 CQH2BRZ9OqfoN86g0uR0CxLsCA== X-Received: by 2002:a37:3389:: with SMTP id z131-v6mr2436976qkz.309.1528394016077; Thu, 07 Jun 2018 10:53:36 -0700 (PDT) Received: from skullcanyon (cable-192.222.221.38.electronicbox.net. [192.222.221.38]) by smtp.gmail.com with ESMTPSA id r1-v6sm24558253qke.14.2018.06.07.10.53.34 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 07 Jun 2018 10:53:35 -0700 (PDT) Message-ID: <3c852dec2279fa95af268357a438d442ddb70d44.camel@ndufresne.ca> Subject: Re: [RFC PATCH 1/2] media: docs-rst: Add decoder UAPI specification to Codec Interfaces From: Nicolas Dufresne To: Tomasz Figa , Hans Verkuil Cc: dave.stevenson@raspberrypi.org, Linux Media Mailing List , Linux Kernel Mailing List , Mauro Carvalho Chehab , Pawel Osciak , Alexandre Courbot , kamil@wypas.org, a.hajda@samsung.com, Kyungmin Park , jtp.park@samsung.com, Philipp Zabel , Tiffany Lin =?UTF-8?Q?=28=E6=9E=97=E6=85=A7=E7=8F=8A=29?= , Andrew-CT Chen =?UTF-8?Q?=28=E9=99=B3=E6=99=BA=E8=BF=AA=29?= , Stanimir Varbanov , todor.tomov@linaro.org, Paul Kocialkowski , Laurent Pinchart Date: Thu, 07 Jun 2018 13:53:33 -0400 In-Reply-To: References: <20180605103328.176255-1-tfiga@chromium.org> <20180605103328.176255-2-tfiga@chromium.org> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.2 (3.28.2-1.fc28) Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le jeudi 07 juin 2018 à 16:30 +0900, Tomasz Figa a écrit : > > > v4l2-compliance (so probably one for Hans). > > > testUnlimitedOpens tries opening the device 100 times. On a normal > > > device this isn't a significant overhead, but when you're allocating > > > resources on a per instance basis it quickly adds up. > > > Internally I have state that has a limit of 64 codec instances (either > > > encode or decode), so either I allocate at start_streaming and fail on > > > the 65th one, or I fail on open. I generally take the view that > > > failing early is a good thing. > > > Opinions? Is 100 instances of an M2M device really sensible? > > > > Resources should not be allocated by the driver until needed (i.e. the > > queue_setup op is a good place for that). > > > > It is perfectly legal to open a video node just to call QUERYCAP to > > see what it is, and I don't expect that to allocate any hardware resources. > > And if I want to open it 100 times, then that should just work. > > > > It is *always* wrong to limit the number of open arbitrarily. > > That's a valid point indeed. Besides the querying use case, userspace > might just want to pre-open a bigger number of instances, but it > doesn't mean that they would be streaming all at the same time indeed. We have used in GStreamer the open() failure to be able to fallback to software when the instances are exhausted. The pros was it fails really early, so falling back is easy. If you remove this, it might not fail before STREAMON. At least in GStreamer, it too late to fallback to software. So I don't have better idea then limiting on Open calls. Nicolas