Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4243527yba; Tue, 7 May 2019 14:51:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqz46tN1BKgceIYKBI3llLapPMsly0GIfmyuLSEeZh9N6bGf3Uok21cS8dnii2F+Ha2fW5ee X-Received: by 2002:a63:ed16:: with SMTP id d22mr8927092pgi.35.1557265887889; Tue, 07 May 2019 14:51:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557265887; cv=none; d=google.com; s=arc-20160816; b=C5/USrbenS7JGkIBbYkjUTe7CYhxgXQ1NR+vi0rBW+txOlGK4H+yBuQsvP6si3JNLn GDgROXJ325/gStgfa1pqaKJG+1uCtStwMFrPY+8jHMSm1bQgB/6o9B4n53+lHkoGezhD rMroFDt8u0dR2+yL4C2jjt/xjqn3sG2PeTIzGZcGq0aRWaV64Vjz9WnDs7AQoQPC5Ryp fnr3J2nV97Zeycmi4f/rzzRyH9nHmMZc8/zKXt+X72nS97q6LCnN6ARm5iEwWhu+Yq0z 7ViqKDuODA1vqkd23GrWfXIOLr1S55cfYTRPXEpG927vWc7SbpbhFPbeZC7SOR+QEuEF qVIg== 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; bh=AXr7qOUfT0IW5ooSoTXWFaFpv17BFr6Gsdxu63xA9AY=; b=jo6zyT7hFgNRgXatbGXlyDZlRHOI47vulcVeH/juOf0cEy3uOKu1rz+NK5mpWebOlQ zLMWtXuvRx2Cc5qPlSMHU0kWXnp8UApo5AIkpLNOfYcXMDEylb4oWbme7wxr0e9LprXp 8XgdijuSrxdZBy6K7eVyrfhSOPby47EdxmpCug6M1UdoiZ+4Y743PCvWA3tNrVi6tsC/ +DVGIfeGth7zAyepExL7MFS1yvD5auOCG3L5heX8D2Gn9QJIXxEVdFCTneJuOm7TnoRW ToPA3lpdQeTHJLOmllbl8y33S6ShLLQUSEn6UUnH5X96bGkr1vgnVofmkjPhmw+uBks1 7Omw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=iki.fi Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f23si19174893pgk.494.2019.05.07.14.51.11; Tue, 07 May 2019 14:51:27 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=iki.fi Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728468AbfEGVFe (ORCPT + 99 others); Tue, 7 May 2019 17:05:34 -0400 Received: from retiisi.org.uk ([95.216.213.190]:40794 "EHLO hillosipuli.retiisi.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726686AbfEGVFe (ORCPT ); Tue, 7 May 2019 17:05:34 -0400 Received: from valkosipuli.localdomain (valkosipuli.retiisi.org.uk [IPv6:2a01:4f9:c010:4572::80:2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by hillosipuli.retiisi.org.uk (Postfix) with ESMTPS id 96178634C7B; Wed, 8 May 2019 00:04:54 +0300 (EEST) Received: from sailus by valkosipuli.localdomain with local (Exim 4.89) (envelope-from ) id 1hO7Gg-0001Uy-9b; Wed, 08 May 2019 00:04:54 +0300 Date: Wed, 8 May 2019 00:04:54 +0300 From: Sakari Ailus To: Nicholas Mc Guire Cc: Nicholas Mc Guire , Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/3] media: smiapp: core: add range to usleep_range Message-ID: <20190507210454.633dxxdggfe27fud@valkosipuli.retiisi.org.uk> References: <1554603364-10500-1-git-send-email-hofrat@opentech.at> <20190430134944.6sutxdztj6crgo6w@valkosipuli.retiisi.org.uk> <20190504094635.GA27029@osadl.at> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190504094635.GA27029@osadl.at> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, May 04, 2019 at 11:46:35AM +0200, Nicholas Mc Guire wrote: > On Tue, Apr 30, 2019 at 04:49:44PM +0300, Sakari Ailus wrote: > > Hi Nicholas, > > > > On Sun, Apr 07, 2019 at 04:16:02AM +0200, Nicholas Mc Guire wrote: > > > Allow the hrtimer subsystem to coalesce delay timers of lower accuracy > > > by providing a suitable range > > > > > > Signed-off-by: Nicholas Mc Guire > > > --- > > > > > > Problem located by an experimental coccinelle script > > > > > > hrtimers in atomic context have limited accuracy due to possible > > > context-switching and interruption so the accuracy is limited > > > anyway. Giving the hrtimer subsystem a reasonable range for merging > > > hrtimers helps to reduce the load on the hrtimer subsystem. As this > > > delays do not seem to mandate high accuracy the range of a factor > > > two seems acceptable. > > > > > > Patch was compile tested with: x86_64_defconfig + MEDIA_SUPPORT=m, > > > MEDIA_CAMERA_SUPPORT=y, MEDIA_CONTROLLER=y, VIDEO_V4L2_SUBDEV_API=y, > > > VIDEO_SMIAPP=m > > > (with a number of sparse warnings on sizeof() usage) > > > > > > Patch is against 5.1-rc3 (localversion-next is next-20190405) > > > > The delays are exact for the reason that they are user-visible delays in > > image capturing related use cases. Sometimes milliseconds matter, or at > > least adding more does not help. > > > > Actually it can be better iwith respect to jitter to let the hrtimer > subsystem use an existing timer event than to have a close by second event > and the accuracy is determined by the non-atomic context anyway - > so while the proposed delay extension might be excessive in your case > I would still suggest to try to get away from a range of 0 - even if > you only end up with (1000,1050) that would be an advantage for the > timer subsystem. Sounds reasonable to me. Would you like to send v2? Thanks. -- Sakari Ailus