From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4731ECF6D28 for ; Wed, 2 Oct 2024 15:02:09 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4XJdM33dGsz2yR5; Thu, 3 Oct 2024 01:02:07 +1000 (AEST) Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1727881326; cv=none; b=ChHg+JXVM/nXLEzFqmzKtYgtweJm7VoR0BH7Jq6JhRYUd+BJk46EcQH20AiBrKjhqnVqEVPBBZhe79GSwUfXSJjeHDqd03TPvyNdT+WTru70Gbkr7ftGiuufcjXVe5aRuh30i1lXcePkRdghw/qKT9J+sHUOJDUMUvfHyOLxMyEdcDNvbxNXRYsXVYivA8+xuxw7f02/ylLn4LgG2w09+lX3QjQpo7Mc9b3iInSg5JVnkotEJlNTCJlJip0XA5vxuvaQCUGYfCXaEdJTlGDUIIIBv8jC2b+5DaTuToIuF0ULqGsnG6D/1iCxUYe8UVPkN439jMgm0oLFj78g8i/+mA== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1727881326; c=relaxed/relaxed; bh=zTt9TS57bBm1l7LQiiCDKRjlEdSZZZ3DNQMytk52ARU=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=hHRvsVBCAttHLFj8d023lDuh72UkxSK9l0QR8D9ISR47OIclpJOOmdUZ1QqyJMb3v9j+pNHlroPFGQMYaLrvYCzGcfaX85Pf/UKH5S6Y+NXSNoETXnmnyf+5EVUjtsYAgf6mSn+t/d3Uwk3qFYU3/WxbP3LZX9Y9EFQsnmCRU6//Fr8jmrfPiZfuK3q5BZdOKdgwUdpKlDorEZvsPsHrx5DjMKSSXpjQFZANRqRQGh45quQpeCyKpeevo751vSn+XHw5sm8w8uHHkL8KXZo4osA40Xa+46ojoTi1jT0pTOPn4qxJsGVXOPiFpkvt2C1hVa+Im8uPGHMn3p17qBerag== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; dkim=pass (2048-bit key; secure) header.d=linutronix.de header.i=@linutronix.de header.a=rsa-sha256 header.s=2020 header.b=ftkGpiO2; dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=ed25519-sha256 header.s=2020e header.b=66EOsvZj; dkim-atps=neutral; spf=pass (client-ip=193.142.43.55; helo=galois.linutronix.de; envelope-from=tglx@linutronix.de; receiver=lists.ozlabs.org) smtp.mailfrom=linutronix.de Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=linutronix.de header.i=@linutronix.de header.a=rsa-sha256 header.s=2020 header.b=ftkGpiO2; dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=ed25519-sha256 header.s=2020e header.b=66EOsvZj; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=linutronix.de (client-ip=193.142.43.55; helo=galois.linutronix.de; envelope-from=tglx@linutronix.de; receiver=lists.ozlabs.org) X-Greylist: delayed 19061 seconds by postgrey-1.37 at boromir; Thu, 03 Oct 2024 01:02:06 AEST Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4XJdM21KCrz2yNc for ; Thu, 3 Oct 2024 01:02:06 +1000 (AEST) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1727881320; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zTt9TS57bBm1l7LQiiCDKRjlEdSZZZ3DNQMytk52ARU=; b=ftkGpiO2tQC3XBHrw0qujIV1hNeH8PfnQMQ9VwuLCIjxOCO4+RIEAn9I80jccRGLuUfOSk qXDh4sI7V1MWbCrSHSvJfBEk8auCJI7R8ToxkbfDQSDW3bm1jTqVibdG24MrR1GkrAzUv7 Nglg5c6UKJD0HkpjdmTN43ERgM4RzKphWDH/FzS7rAkB6mBTwRcgr3It2HD85k6P6AksaL TKjMavUpYwVbOYdL7WX09DxO+A6FMPf31BDuSzqfaSYwbj/UxUygslhbSgNLXtVjaN8iVG f8x+SSD8udWBVY6NiUPl5wAkEiUQIWiCAFA2kEwDfY+0UziV4DdNXPHQvjrFJg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1727881320; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zTt9TS57bBm1l7LQiiCDKRjlEdSZZZ3DNQMytk52ARU=; b=66EOsvZjXy/H8TUUFSCmjovMyk1OBLtQIimAE8qOVHy7xmFexHyu16tDAVzVdvfGB0RUNK FPjKICAnWvLC8OCQ== To: Christophe JAILLET , Frederic Weisbecker , Jonathan Corbet , Anna-Maria Behnsen Cc: linux-kernel@vger.kernel.org, Len Brown , "Rafael J. Wysocki" , Anna-Maria Behnsen , Andrew Morton , damon@lists.linux.dev, linux-mm@kvack.org, SeongJae Park , Arnd Bergmann , linux-arch@vger.kernel.org, Heiner Kallweit , "David S. Miller" , Andy Whitcroft , Joe Perches , Dwaipayan Ray , Liam Girdwood , Mark Brown , Andrew Lunn , Jaroslav Kysela , Takashi Iwai , netdev@vger.kernel.org, linux-sound@vger.kernel.org, Michael Ellerman , Nathan Lynch , linuxppc-dev@lists.ozlabs.org, Mauro Carvalho Chehab , linux-media@vger.kernel.org Subject: Re: [PATCH v2 00/15] timers: Cleanup delay/sleep related mess In-Reply-To: References: <20240911-devel-anna-maria-b4-timers-flseep-v2-0-b0d3f33ccfe0@linutronix.de> Date: Wed, 02 Oct 2024 17:02:00 +0200 Message-ID: <87ttduwntj.ffs@tglx> X-Mailing-List: linuxppc-dev@lists.ozlabs.org List-Id: List-Help: List-Post: List-Subscribe: , , List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Mon, Sep 16 2024 at 22:20, Christophe JAILLET wrote: > Le 11/09/2024 =C3=A0 07:13, Anna-Maria Behnsen a =C3=A9crit=C2=A0: > > not directly related to your serie, but some time ago I sent a patch to=20 > micro-optimize Optimize usleep_range(). (See [1]) > > The idea is that the 2 parameters of usleep_range() are usually=20 > constants and some code reordering could easily let the compiler compute= =20 > a few things at compilation time. > > There was consensus on the value of the change (see [2]), but as you are= =20 > touching things here, maybe it makes sense now to save a few cycles at=20 > runtime and a few bytes of code? For the price of yet another ugly interface and pushing the multiplication into the non-constant call sites. Seriously usleep() is not a hotpath operation and the multiplication is not even measurable except in micro benchmarks. Thanks, tglx