From nobody Mon Nov 25 02:49:28 2024 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 46AB519DFAB for ; Thu, 31 Oct 2024 15:15:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730387709; cv=none; b=qEJWbzq5xSCM37bpgbmXZSvSTyLh0VB6MBICm8g3aiw522LaY0e4eKeRvnOmaV6+ro3aj+FKPryynyjBBohKIuNp5kYaqpWmV1hb+f/7/aXAm6r07V6PcyoIggQkkNgG2RhtUxM7OyiRbDrv6ky8LzcsqPRXM1OKjPAc0lQ4Cw4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730387709; c=relaxed/simple; bh=lyvWCRoP2a1MaCIJFFS+qPNDimT8IhKEbi3bTW86r6Q=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=gh0jI93mQmPvxltfHt4ObCDJgfz7CJxSBapEcSQo5Tf80nmRNHRlzthKPgONRk9qXPHA17CmUU5Fg4FAdKrrzohSLabiz2DLK0y4UitEoob3R8ve3M9cZylcCuoNbTKkukU3zuRdr29q3gOggAXIkVQ2MWzslC5nBE9nBPGD75A= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=yxGAz47h; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=T17HRGfN; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="yxGAz47h"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="T17HRGfN" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1730387703; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=sns3owJJ1g5SJOVsE11NYeiKC9zvBohYSIHK9XSQxGI=; b=yxGAz47hg+xN1wnLqYFDctZ2sn9Ujw5ytQE1byQCTKcCfxbvp2DGHiP9362f2lr543az3p gHEgizXYWPK3s0NSUu5SS+zz1h/kVrDKUNgY4XT8k9OsO22/yFCS0LH+hWxXTRfF2CqCF3 nCyFFqq0r8zU1rhVvbozVLJaMIT70alPfW/0OL2K6LSlbDSwON6WNujUAIfq6Hz9VZQCXj TlKyyaLvGs4fAFalzUFkUKB5jgHjlixFJEguZnMJOpSTLZ5Hs4rAYwmMp+rsQN1WynADDv o5vd5I7AY0nWrWZiR3Y0w1xS6VbzlQFIQDUx5jSw9GMzVIwi5zxp/Ay9x+KCtg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1730387703; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=sns3owJJ1g5SJOVsE11NYeiKC9zvBohYSIHK9XSQxGI=; b=T17HRGfN3sJBYQ1qOGf/HGL9R/XXGtOx7PITdK9zzn2j1JlHM0XCd+cbpxUPDYYb/qCyEg l6w7Q5w9hhyMbsBQ== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , Andreas Hindborg , Alice Ryhl , Miguel Ojeda , Kees Cook , linux-kernel@vger.kernel.org Cc: Jani Nikula , intel-gfx@lists.freedesktop.org, Sean Christopherson , Paolo Bonzini , x86@kernel.org, Jakub Kicinski , Kalle Valo , Jens Axboe , Christian Brauner , Peter Zijlstra , John Stultz , Nam Cao , Oliver Hartkopp Subject: [RESEND PATCH v2 05/19] io_uring: Remove redundant hrtimer's callback function setup Date: Thu, 31 Oct 2024 16:14:19 +0100 Message-Id: <07b28dfd5691478a2d250f379c8b90dd37f9bb9a.1730386209.git.namcao@linutronix.de> In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The IORING_OP_TIMEOUT command uses hrtimer underneath. The timer's callback function is setup in io_timeout(), and then the callback function is setup again when the timer is rearmed. Since the callback function is the same for both cases, the latter setup is redundant, therefore remove it. Signed-off-by: Nam Cao Cc: Jens Axboe Reviewed-by: Jens Axboe timeout_lock); list_add(&timeout->list, ctx->timeout_list.prev); - data->timer.function =3D io_timeout_fn; hrtimer_start(&data->timer, timespec64_to_ktime(data->ts), data->mode); spin_unlock_irq(&ctx->timeout_lock); return; --=20 2.39.5