Received: by 2002:ab2:69cc:0:b0:1f4:be93:e15a with SMTP id n12csp141282lqp; Fri, 12 Apr 2024 12:57:07 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV8VUxb9y5tbLaR5PeVGJ2rcVo2rC6de2xXac1I6u31HDeEKXFoK2Pdf0BmRHqpewoiRdhJj9EBWZ3yoMuFLv+F3MmpwRCkmfDK0yoJeA== X-Google-Smtp-Source: AGHT+IHEPjoRbD7SNc0pUul2yZ/FJMeY/uvCJjPVLWmsSjx4LTQEJCu1lTwLcTG7ZXM5yFAxfGeh X-Received: by 2002:a17:906:dc8f:b0:a51:af7d:4652 with SMTP id cs15-20020a170906dc8f00b00a51af7d4652mr3559602ejc.32.1712951827045; Fri, 12 Apr 2024 12:57:07 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712951827; cv=pass; d=google.com; s=arc-20160816; b=t5G4COPoL0DKIUGdSjPSaqncNDtGtvcZwlmV6qP+cbxdp/ufvFeN2xh1Z2t+clLpjs WFUIZw2r+rRK67lfxPuSTzeqglJu2+TNo39W8To0sHaxleksL4xylUEImuTPLg4Uwsoj JoRgGX9ARmiIi746RL2a/ylkkqgc5FGy78y/GyPVGzzgw1/HiVT0Vi0yZ/UGtpA6FO3A CP0p3WbS+aqLu0iBSJJcxM6LRR9NCN3wuk3MlRdsgh2BMzQ/hVHxhVspWuUoF6Iv1Fke y6MH0xoX97vbYBFFc+Mj3e681Pl02DoN4L3Trep1thx+S/FQyH62Tui56eFbD9pFNLc9 9Urw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :message-id:date:references:in-reply-to:subject:cc:to:dkim-signature :dkim-signature:from; bh=T1vyvcDhC58JLm7RLxNaW159SgckVo+LvqWczZaOlJk=; fh=NCTis4ymTI85epPe/yXRZiYUMU6K+XRAvcmJcJ7VZC0=; b=ZYBnUVFsdzU/yMBAEornARR2ir+AxJkf1x7odpvE5lFi40uOUKjUCIUvv9qOLpwCcY JrZoc03pslx75RWhkwjfUIUq+QnkZpfIEPHxOSdGHMR2AV1PuDobAJhMn1e67RUcQUZN Ge/RI2fS1Wfcnxp/QLaIRPZyZQ0WEiv+ff+r/3hHcVmv5DwFUqOkmvR97laxh4xlZhq9 o3tzsyoXrnho9KIuOXv8v9JwXlYpajFDwwUvWExxWmo7J3WiL9XnUYvnFkS9VpBAA8oX 7f9drffvtAyyYqQZX3IkakNtUV016QEZmdRtqZNzqVZrrjbW/YMHDw9glO6baIbHQPvq iO+A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=Rol3UFQd; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=+wva99r1; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-143271-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-143271-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id kv21-20020a17090778d500b00a5196a15dd1si1927982ejc.176.2024.04.12.12.57.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Apr 2024 12:57:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-143271-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=Rol3UFQd; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=+wva99r1; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-143271-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-143271-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 37D1D1F25C14 for ; Fri, 12 Apr 2024 19:48:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 22205150981; Fri, 12 Apr 2024 19:48:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="Rol3UFQd"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="+wva99r1" 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 0C9FC405FD for ; Fri, 12 Apr 2024 19:48:25 +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=1712951307; cv=none; b=FDKP3INAAioAKn4zG7v8ywBYRY/5TTXSqJ1cdNda+hDfmYytcI9rmOZF8GtWznRDWek6sWFiWASXNqmyBWE97AUQW/kOsi99/VxeAuIPypeXhhB4sPeYmqVf1iCGobQVTtzLAXDQUouKRDR/WOMn9qdk7vO7hZLmnGjx4wzKYOE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712951307; c=relaxed/simple; bh=gvBb/3sOt9Qvp6wLzqbJbKrrCL8NP4h8q5rBctg3GSU=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=q90fgeyrfkBbr25LbXKPQNwstnMae8RgM87C4aA3yr78DP7En4nPh+cyAScVMvkS9Ptj8dLyuHfZJkVw+8yuGlMWDDfCbcKMi+TFokss3GQoF869bWCHqaKw89rBTJzUYRdMG3lIiNQZG0XPH20+VnHbr40jo4x9BRwhlNdK05g= 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=Rol3UFQd; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=+wva99r1; 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 From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1712951304; 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: in-reply-to:in-reply-to:references:references; bh=T1vyvcDhC58JLm7RLxNaW159SgckVo+LvqWczZaOlJk=; b=Rol3UFQdnbm+phlwCqPYQhYOpgVywBhFXjBjpW8EcYqJm52Eyurq4CRBevU0G8GgbzH9Vy nhEHvKOoJ7Ocq49eQnjvuFSWlmJBhRrZxyvql1nK9fqOhdJmiI43QURiMn6ekQUiJtMAR7 NTkQ5+bULDllJNCkqGXNW90BFOH1075W2jECe9mjSER/yV0q9Ma/xScXadC62ozdXZWy5L hXmOKWWtLa7Z+IQu8+mOuoUM0rLe23aGaC8pAFb6ffHJA4tsz+51OltmZGFOIxWGSrUJNQ /TBI2HqMIyjJ/fDQ/V2JVOKodM5xd5mP43O6KChf9CI5A8xWBfxQAlCvMS1izQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1712951304; 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: in-reply-to:in-reply-to:references:references; bh=T1vyvcDhC58JLm7RLxNaW159SgckVo+LvqWczZaOlJk=; b=+wva99r1FJa/LWjWhAjfjRQVcAppxuAozPmQzy71WOTAayQJudzY+y5ueftRrufMi89Qu6 CkA/pEEk+Yix9nBg== To: "Eric W. Biederman" Cc: LKML , Anna-Maria Behnsen , Frederic Weisbecker , John Stultz , Peter Zijlstra , Ingo Molnar , Stephen Boyd , Oleg Nesterov Subject: Re: [patch V2 07/50] posix-cpu-timers: Split up posix_cpu_timer_get() In-Reply-To: <87mspyxwua.fsf@email.froward.int.ebiederm.org> References: <20240410164558.316665885@linutronix.de> <20240410165551.376994018@linutronix.de> <87mspyxwua.fsf@email.froward.int.ebiederm.org> Date: Fri, 12 Apr 2024 21:48:23 +0200 Message-ID: <87jzl2z7js.ffs@tglx> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain On Fri, Apr 12 2024 at 13:25, Eric W. Biederman wrote: > Thomas Gleixner writes: >> In preparation for addressing issues in the timer_get() and timer_set() >> functions of posix CPU timers. > > To see that this was safe I had to lookup and see that > cpu_timer_getexpires is a truly trivial function. > > static inline u64 cpu_timer_getexpires(struct cpu_timer *ctmr) > { > return ctmr->node.expires; > } > > I am a bit confused by the purpose of this function in > posix-cpu-timers.c. I added that back then when I converted the code over to use a timerqueue instead of a linked list mostly because I did not want to fiddle in the inwars of timerqueue. > In some places this helper is used (like below), and in other places > like bump_cpu_timer the expires member is accessed directly. > > It isn't really a problem, but it is something that might be > worth making consistent in the code to make it easier to read. Yes, that's definitely inconsistent. I'll have a look. Thanks, tglx