Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp5988936rwd; Mon, 19 Jun 2023 00:07:16 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6alPbygMV5YfKhc7lyxH3b8EcOdUEvw6jSukKGH5egyufkffYlp6exkCpoqnaO5XwwNacq X-Received: by 2002:a17:902:ea01:b0:1ad:f407:37d1 with SMTP id s1-20020a170902ea0100b001adf40737d1mr45439plg.52.1687158436092; Mon, 19 Jun 2023 00:07:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687158436; cv=none; d=google.com; s=arc-20160816; b=vLMNC6tkDT6wXyKu3njNXlflFZJhC1hu9dEk+gWQvVDcjCrXWONiaxTo71VP69D6PS v/6Mr9UHFBks65QL5RVCerOqwara22/dy/eSNYx76lFc/hFd/jkJPY9uKN8Lubst7aTY bpygwp5S61JQRGFvaYw2zoM6f3VdRYfZZ6nOAPm01q28RiKBGwxIy/4oLNK1JXn1fiQw 5EoLrubvPSASBcjuQ3l47UwM7bSvJgJ/43iHi8WZNx9q7IMXSzb7S0gBIOdEIiR2ysBM WSEEcZoVKJqIDkciviGAX71Y22hb0uZJ+TTJkJt+PBVXTeMlevEw902zYn72JaVXaWyg oojQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=F35l24Y1c4jctrhT8Q26aVqulXBZbv2H05T0PMbzFsI=; b=RfJCHkybF8P1i7Gykpc/97Qf+JrRgYHl9ScysDjx7oht+zG8EA5cNnksxcUpnU2zWM WwP72YSQhFcUnYuL3KmZkjpBd8bzRjyj6FdFUYuMJK+qqd9U424bDf3c6jfdUTOZkBga BCm2o2ddgYGYLIY6FhE4VCInIbU8UBP4M80xCEj4YPHTJqOUhqLSUQOHjOOnMa8ntTkq +RNsm9HAGjDcdsdYrPfxHNUIAW9HU0yDg/BrhNG4dIF/1AbhRcx7xpFCArZi6SjxrC3U Tah89e7JvUoWPIs2n6LyU9UI9oxXO3qHTrFgU1wA1ldmIGnoKrhJzVKVFJnEwu4/zzCx PXtw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=wTw4njNy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f18-20020a170902ce9200b001b0347b904csi21465603plg.275.2023.06.19.00.07.03; Mon, 19 Jun 2023 00:07:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=wTw4njNy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229888AbjFSGSR (ORCPT + 99 others); Mon, 19 Jun 2023 02:18:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40052 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229596AbjFSGSQ (ORCPT ); Mon, 19 Jun 2023 02:18:16 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 887A88F; Sun, 18 Jun 2023 23:18:15 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 1DA11614A7; Mon, 19 Jun 2023 06:18:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7E0F9C433C0; Mon, 19 Jun 2023 06:18:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1687155494; bh=1QwrfkXws282a/X0drBElYIBbWLM8rTUZ8/6zofeERE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=wTw4njNyovkm9utAYfDJaAvpzyn0fan/TX8kaURDGHCroW8Ro2UX+6XbxZ+dCM/Nu fuihdgPbqZS1rrJHZdA6W3t1/ads6YvYKWMpTAtdOBRsx0VnIqG4a/uZHgxo35Kx8k UgssX+NSq+qYffLd1vRbANZKktwPH63Sql/TsY9E= Date: Mon, 19 Jun 2023 08:18:10 +0200 From: Greg KH To: Sebastian Andrzej Siewior Cc: Mathias Krause , Luiz Capitulino , Sven-Haegar Koch , "Bhatnagar, Rishabh" , "linux-kernel@vger.kernel.org" , "tglx@linutronix.de" , "sashal@kernel.org" , abuehaze@amazon.com, "stable@vger.kernel.org" , Frederic Weisbecker , Ingo Molnar Subject: Re: [PATCH] tick/common: Align tick period during sched_timer setup. Message-ID: <2023061944-uprising-applaud-990a@gregkh> References: <12c6f9a3-d087-b824-0d05-0d18c9bc1bf3@amazon.com> <2023061428-compacter-economic-b648@gregkh> <20230614092045.tNY8USjq@linutronix.de> <4c4178a1-1050-ced4-e6fb-f95c3bdefc98@amazon.com> <2a3fa097-8ba0-5b0e-f506-779fee5b8fef@sdinet.de> <23fb8ad7-beb0-ae1c-fa5a-a682a57f79b0@grsecurity.net> <20230615091830.RxMV2xf_@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230615091830.RxMV2xf_@linutronix.de> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 15, 2023 at 11:18:30AM +0200, Sebastian Andrzej Siewior wrote: > From: Thomas Gleixner > > The tick period is aligned very early while the first clock_event_device > is registered. The system runs in periodic mode and switches later to > one-shot mode if possible. > > The next wake-up event is programmed based on aligned value > (tick_next_period) but the delta value, that is used to program the > clock_event_device, is computed based on ktime_get(). > > With the subtracted offset, the devices fires in less than the exacted > time frame. With a large enough offset the system programs the timer for > the next wake-up and the remaining time left is too little to make any > boot progress. The system hangs. > > Move the alignment later to the setup of tick_sched timer. At this point > the system switches to oneshot mode and a highres clocksource is > available. It safe to update tick_next_period ktime_get() will now > return accurate (not jiffies based) time. > > [bigeasy: Patch description + testing]. > > Reported-by: Mathias Krause > Reported-by: "Bhatnagar, Rishabh" > Fixes: e9523a0d81899 ("tick/common: Align tick period with the HZ tick.") > Signed-off-by: Thomas Gleixner > Signed-off-by: Sebastian Andrzej Siewior > Link: https://lore.kernel.org/5a56290d-806e-b9a5-f37c-f21958b5a8c0@grsecurity.net > Link: https://lore.kernel.org/12c6f9a3-d087-b824-0d05-0d18c9bc1bf3@amazon.com > --- > kernel/time/tick-common.c | 11 +---------- > kernel/time/tick-sched.c | 13 ++++++++++++- > 2 files changed, 13 insertions(+), 11 deletions(-) What's the status of this fix, I didn't see it in -rc7, am I looking in the wrong place? thanks, greg k-h