Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1031830pxj; Fri, 4 Jun 2021 04:33:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzv3EYwSjgTth6LHKugVYhvDBeZzBG5fO9TDlNHOMJvjKplXtfVo7fqORjJlSHWwaI3Ccv/ X-Received: by 2002:aa7:d28a:: with SMTP id w10mr4140764edq.23.1622806399119; Fri, 04 Jun 2021 04:33:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622806399; cv=none; d=google.com; s=arc-20160816; b=RIsm4E+6xin04MULa5q7dnd1iA3I8ESt8zTS3Z8aQ8p9xlECSUcI9i8Fy4S+C+C7CV g0mIKoYQ+26kgm5MYkjpcR0vpZZApWAbr/vjFPnmmMk9n02yJSXA1gJpbhbDZdl7YLFm BHm2bIFgrSEFN29I6FeDDCvwCzkj492BP2lnYFmN20j4031jsG1UF6Mqh/iDEcHgULA3 lVaV3dv6vpgGAa1XrP6UbI4MC5bG5mFpiMG4C9Zu6xFmwUthY2Q3njV5hrxVwJY1DLJ9 BgS4te65E3eILsPAZLLX9a8zwaWFGnnKe6EyZQaBzLkGT4TsSDN2/uABvnWaiyU9HQ38 ZsCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=GLz+bqankardVvXCA+XxWrLzAj+qe2xu6mA9hjfQyJs=; b=yvxy1Hrd3gruz6lg9qLeIpZTnMkrKv5vrKDrkASJWHTjIsG0CMhtKmY/+kkykcsAYW APReddKKvbQKquW3Hq9Voqt5fd3ImVx8pqS4nLL8wl66hbWx9Rd1NwesmvrxGlvMoAI5 5AS5Hu9O8i2ZTLqCJFOUjKHXhtjcSMizK1+HhXZPf8NPbpSdQ/wvVK3bhO2vvKIvC9k1 r8+iEg36HbhLiPMiUjqr7kijcfappJaj9kiSSOKHULyEVEJ7vjnqOut2Kjr7pFrtapP3 /HHUEEZocDKzvlgc05x5oGCFqeG9n3vonSjDGJuAfRW658CHyt8fndlECjbJqdhSPFo3 tz9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=LBUxY5Bp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v9si4496382eds.500.2021.06.04.04.32.55; Fri, 04 Jun 2021 04:33:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=LBUxY5Bp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229999AbhFDLdv (ORCPT + 99 others); Fri, 4 Jun 2021 07:33:51 -0400 Received: from mail.kernel.org ([198.145.29.99]:34240 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229740AbhFDLdu (ORCPT ); Fri, 4 Jun 2021 07:33:50 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4A839613F9; Fri, 4 Jun 2021 11:32:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1622806324; bh=HBQeEl/CUgi+q6JezbobhTZCvfu9mgxmoaahKITVgPQ=; h=From:To:Cc:Subject:Date:From; b=LBUxY5BpUKhPrEgSAYTDfML8Y2JaVbPPeF/f6lpCOStOUQfmoe+vfBVkC03Qn927K 6xei27p1wkZ84eDYGFfnYKfnjEAGlq4pfpaAdW27UruWgpIY+jrHQk2CkoImnIFNNI kg4479S83pvscF4Dq4+NccM77ZAAh3PHFbiIczkXkOeCD5QNtyRahwkdiDvy8QJ/PL VfCmUV89hh80Ut5W2jXMMzLZqX6R1GwJqvuCqNWBrB3UAL+Xfi6jh3PZ3tJFwqwoIc BkIMyL2+xW7uleVKQyZvnxa32fm/PwcLyq7eVKd1zny2ZQxmyPpsN+tMrttCE2IQ4q 90zEIK9GHvOng== From: Frederic Weisbecker To: Thomas Gleixner Cc: LKML , Frederic Weisbecker , Peter Zijlstra , "Eric W . Biederman" , Oleg Nesterov , Ingo Molnar Subject: [PATCH 0/6] posix-cpu-timers: Bunch of fixes Date: Fri, 4 Jun 2021 13:31:53 +0200 Message-Id: <20210604113159.26177-1-frederic@kernel.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The first is a race due to locklessly starting process wide cputime counting. The others stop the process wide cputime counting and tick dependency when they are not necessary anymore. Note I don't really like patch 5/6 and in fact I hope we could manage to remove this early inline cpu_timer_fire() call from timer_settime(). All we get from it is headaches. Besides, the handler isn't invoked from the actual target and that doesn't sound ideal. git://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks.git timers/urgent HEAD: f8f908c9d2b2f1e100cd549206c95a4e65e5f023 Thanks, Frederic --- Frederic Weisbecker (6): posix-cpu-timers: Fix rearm racing against process tick posix-cpu-timers: Don't start process wide cputime counter if timer is disabled posix-cpu-timers: Force next_expiration recalc after timer deletion posix-cpu-timers: Force next_expiration recalc after timer reset posix-cpu-timers: Force next expiration recalc after early timer firing posix-cpu-timers: Force next expiration recalc after itimer reset include/linux/posix-timers.h | 11 ++++- kernel/time/posix-cpu-timers.c | 97 +++++++++++++++++++++++++++++++++--------- 2 files changed, 87 insertions(+), 21 deletions(-)