Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.1/patches/2220903/?format=api
{ "id": 2220903, "url": "http://patchwork.ozlabs.org/api/1.1/patches/2220903/?format=api", "web_url": "http://patchwork.ozlabs.org/project/netfilter-devel/patch/20260408114952.332822525@kernel.org/", "project": { "id": 26, "url": "http://patchwork.ozlabs.org/api/1.1/projects/26/?format=api", "name": "Netfilter Development", "link_name": "netfilter-devel", "list_id": "netfilter-devel.vger.kernel.org", "list_email": "netfilter-devel@vger.kernel.org", "web_url": null, "scm_url": null, "webscm_url": null }, "msgid": "<20260408114952.332822525@kernel.org>", "date": "2026-04-08T11:54:11", "name": "[V2,06/11] alarmtimer: Provide alarm_start_timer()", "commit_ref": null, "pull_url": null, "state": "handled-elsewhere", "archived": true, "hash": "6166ff4fd408368e7b8e6d0fa3bcc3c1bb0c6108", "submitter": { "id": 92397, "url": "http://patchwork.ozlabs.org/api/1.1/people/92397/?format=api", "name": "Thomas Gleixner", "email": "tglx@kernel.org" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/netfilter-devel/patch/20260408114952.332822525@kernel.org/mbox/", "series": [ { "id": 499126, "url": "http://patchwork.ozlabs.org/api/1.1/series/499126/?format=api", "web_url": "http://patchwork.ozlabs.org/project/netfilter-devel/list/?series=499126", "date": "2026-04-08T11:53:41", "name": "hrtimers: Prevent hrtimer interrupt starvation", "version": 2, "mbox": "http://patchwork.ozlabs.org/series/499126/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2220903/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2220903/checks/", "tags": {}, "headers": { "Return-Path": "\n <netfilter-devel+bounces-11719-incoming=patchwork.ozlabs.org@vger.kernel.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "netfilter-devel@vger.kernel.org" ], "Delivered-To": "patchwork-incoming@legolas.ozlabs.org", "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256\n header.s=k20201202 header.b=aUWORh8j;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c04:e001:36c::12fc:5321; helo=tor.lore.kernel.org;\n envelope-from=netfilter-devel+bounces-11719-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)", "smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org\n header.b=\"aUWORh8j\"", "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=10.30.226.201" ], "Received": [ "from tor.lore.kernel.org (tor.lore.kernel.org\n [IPv6:2600:3c04:e001:36c::12fc:5321])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4frM6b3mNhz1yD3\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 08 Apr 2026 21:59:03 +1000 (AEST)", "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby tor.lore.kernel.org (Postfix) with ESMTP id 2E94B30F4A33\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 8 Apr 2026 11:54:51 +0000 (UTC)", "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 71BEE3BBA01;\n\tWed, 8 Apr 2026 11:54:15 +0000 (UTC)", "from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org\n [10.30.226.201])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id ED8AC3B8BBF;\n\tWed, 8 Apr 2026 11:54:14 +0000 (UTC)", "by smtp.kernel.org (Postfix) with ESMTPSA id 0E01BC19421;\n\tWed, 8 Apr 2026 11:54:13 +0000 (UTC)" ], "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1775649255; cv=none;\n b=UB/KMr3b9mKHdxAlWOHcmn58SXp9Z+LJpXLGy8DIE8kW0lXamP8o4C0KcoPAHHC6gbR8M8d+wvY5BxVn7nSPx+SSmyW61+e8Rjh7TVJxNIxXy0288D8FTGZkj2LJv1brhIhG0cfPJ2E8AzuTKbTYIywm1GtPiWmAaZ14EQe2aWI=", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1775649255; c=relaxed/simple;\n\tbh=YIwK+oTFsr7FtmUMtD6jU5Zh3TOHfMdcCbzlxv+EOgE=;\n\th=Date:Message-ID:From:To:Cc:Subject:References:MIME-Version:\n\t Content-Type;\n b=m5dafwh9VSoMf2rIpEYduN3Mmh+36XVW1P5OHDIVeXv7ujo6EgyKU+/lcA0rzAjfUqCC84MmFNxkXoCcrmpr3KLNI9Lmr27NLBX98VvqEtvHgdx71Ont4BPdHzIhQf1aH4b1jUuSxCZDa4+DlrvugGdgRvGDUtEOqaGm/Rns4EU=", "ARC-Authentication-Results": "i=1; smtp.subspace.kernel.org;\n dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org\n header.b=aUWORh8j; arc=none smtp.client-ip=10.30.226.201", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;\n\ts=k20201202; t=1775649254;\n\tbh=YIwK+oTFsr7FtmUMtD6jU5Zh3TOHfMdcCbzlxv+EOgE=;\n\th=Date:From:To:Cc:Subject:References:From;\n\tb=aUWORh8jnpJkqBZ9MPr6oE8wBea+vpybbs9uFZPPCfx8Vpea7tIT1P00holD6vWH0\n\t peVGZhybxP3x+wMR/JvxURC3ttXcr+cX55L/4BIT9yXbT2kSl0PhuV3wZGhLFL7eZJ\n\t eI3+O8Ifs2YcjXRdhr6nzvt9IWFY/4Hxur+RKhlOiZ5fvMq2JjwxsHj14cFqG9ahbc\n\t eqbSPFIgLVzOGfAHjOweyNGoIElXybHrmqBZXa9dQnLOzky3tuWD8PhrxV45rajp12\n\t tGvZJaMJUOEyhQl+v7uRerhkfjy2yDO/ZX3P9ApQyJNk9wRsHyBBR3XADXRsjzObu3\n\t louz+F6zsTisg==", "Date": "Wed, 08 Apr 2026 13:54:11 +0200", "Message-ID": "<20260408114952.332822525@kernel.org>", "User-Agent": "quilt/0.68", "From": "Thomas Gleixner <tglx@kernel.org>", "To": "LKML <linux-kernel@vger.kernel.org>", "Cc": "John Stultz <jstultz@google.com>,\n Stephen Boyd <sboyd@kernel.org>,\n Calvin Owens <calvin@wbinvd.org>,\n Anna-Maria Behnsen <anna-maria@linutronix.de>,\n Frederic Weisbecker <frederic@kernel.org>,\n \"Peter Zijlstra (Intel)\" <peterz@infradead.org>,\n Alexander Viro <viro@zeniv.linux.org.uk>,\n Christian Brauner <brauner@kernel.org>,\n Jan Kara <jack@suse.cz>,\n linux-fsdevel@vger.kernel.org,\n Sebastian Reichel <sre@kernel.org>,\n linux-pm@vger.kernel.org,\n Pablo Neira Ayuso <pablo@netfilter.org>,\n Florian Westphal <fw@strlen.de>,\n Phil Sutter <phil@nwl.cc>,\n netfilter-devel@vger.kernel.org,\n coreteam@netfilter.org", "Subject": "[patch V2 06/11] alarmtimer: Provide alarm_start_timer()", "References": "<20260408102356.783133335@kernel.org>", "Precedence": "bulk", "X-Mailing-List": "netfilter-devel@vger.kernel.org", "List-Id": "<netfilter-devel.vger.kernel.org>", "List-Subscribe": "<mailto:netfilter-devel+subscribe@vger.kernel.org>", "List-Unsubscribe": "<mailto:netfilter-devel+unsubscribe@vger.kernel.org>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=UTF-8" }, "content": "Alarm timers utilize hrtimers for normal operation and only switch to the\nRTC on suspend. In order to catch already expired timers early and without\ngoing through a timer interrupt cycle, provide a new start function which\ninternally uses hrtimer_start_range_ns_user().\n\nIf hrtimer_start_range_ns_user() detects an already expired timer, it does\nnot queue it. In that case remove the timer from the alarm base as well.\n\nReturn the status queued or not back to the caller to handle the early\nexpiry.\n\nSigned-off-by: Thomas Gleixner <tglx@kernel.org>\nAcked-by: John Stultz <jstultz@google.com>\nCc: Stephen Boyd <sboyd@kernel.org>\n---\nV2: Rename to alarm_start_timer() - Peter\n---\n include/linux/alarmtimer.h | 6 ++++++\n kernel/time/alarmtimer.c | 28 ++++++++++++++++++++++++++++\n 2 files changed, 34 insertions(+)", "diff": "--- a/include/linux/alarmtimer.h\n+++ b/include/linux/alarmtimer.h\n@@ -42,8 +42,14 @@ struct alarm {\n \tvoid\t\t\t*data;\n };\n \n+static __always_inline ktime_t alarm_get_expires(struct alarm *alarm)\n+{\n+\treturn alarm->node.expires;\n+}\n+\n void alarm_init(struct alarm *alarm, enum alarmtimer_type type,\n \t\tvoid (*function)(struct alarm *, ktime_t));\n+bool alarm_start_timer(struct alarm *alarm, ktime_t expires, bool relative);\n void alarm_start(struct alarm *alarm, ktime_t start);\n void alarm_start_relative(struct alarm *alarm, ktime_t start);\n void alarm_restart(struct alarm *alarm);\n--- a/kernel/time/alarmtimer.c\n+++ b/kernel/time/alarmtimer.c\n@@ -365,6 +365,34 @@ void alarm_start_relative(struct alarm *\n }\n EXPORT_SYMBOL_GPL(alarm_start_relative);\n \n+/**\n+ * alarm_start_timer - Sets an alarm to fire\n+ * @alarm:\tPointer to alarm to set\n+ * @expires:\tExpiry time\n+ * @relative:\tTrue if @expires is relative\n+ *\n+ * Returns: True if the alarm was queued. False if it already expired\n+ */\n+bool alarm_start_timer(struct alarm *alarm, ktime_t expires, bool relative)\n+{\n+\tstruct alarm_base *base = &alarm_bases[alarm->type];\n+\n+\tif (relative)\n+\t\texpires = ktime_add_safe(expires, base->get_ktime());\n+\n+\ttrace_alarmtimer_start(alarm, base->get_ktime());\n+\n+\tguard(spinlock_irqsave)(&base->lock);\n+\talarm->node.expires = expires;\n+\talarmtimer_enqueue(base, alarm);\n+\tif (!hrtimer_start_range_ns_user(&alarm->timer, expires, 0, HRTIMER_MODE_ABS)) {\n+\t\talarmtimer_dequeue(base, alarm);\n+\t\treturn false;\n+\t}\n+\treturn true;\n+}\n+EXPORT_SYMBOL_GPL(alarm_start_timer);\n+\n void alarm_restart(struct alarm *alarm)\n {\n \tstruct alarm_base *base = &alarm_bases[alarm->type];\n", "prefixes": [ "V2", "06/11" ] }