From mboxrd@z Thu Jan 1 00:00:00 1970 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 D5A7015E97; Mon, 30 Sep 2024 19:16:10 +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=1727723772; cv=none; b=GtMMYZBvEC1SgCXR1ptCoqaqutmuoIOD/LJy9MzzGtK5SMs29GKjVMLGGX0Mx6dMaNNIK/mEs8znq69wUywuY2y2IhzGxnMSESjOWSUuPsrbv9YywrYjk9ZzJIq8easu/uImBJqir8eyKGioSUtz0YauFLGp9dlYs6/i9PnPM7Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727723772; c=relaxed/simple; bh=mbPkm7okFjtQ2jT5AxFJj8n1vkGBMmVePJJNRPRtVno=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=SYB5Jb+ILjv9fLDB5aWBsRhvMIxD09DgHSY3khBtoldZTIZ6zAwmId3E155hy2yaN+iceizbUz3QuVoKEu1qgDDQznDVGTg/DbWzQG5snbcwqKs8TRbfkNDTOjjn1WVG31LPK0m0+HnEqseBQp3hTQDta/g1PlaWf8H1EbTojRo= 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=k15weHyo; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=LzSX6w1K; 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="k15weHyo"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="LzSX6w1K" From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1727723768; 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=iCvcoZK/1u84ANwEMkWcEIyXDRG96pAVEQ+ONN9fVq4=; b=k15weHyo206AD3mAwvey/aNEbq7AsI86ZKn2w2uPvLQHKUfl8PURomKwotvHQfopogWV78 4/u/SUbDveNrg/WjTDPr2Wdd1MiAggTT9wKElFbifsDpJP2tV3R7ae+EKq4Q6/QzlqeNxn WZqPyEX1GyKTSWT3ZiaDR+Utg16zM0UCH2/hOEwUOdq8LR2/Z0iYzDB86sKictH7HFnNfP hHoMMn1gQculKdiwekmOWTHzLxzji3XFQRAOSbjC6FhSOS3CI7LV1EhvTP5hp0AZ6dyKV4 +Bkuk94NckRLi+lb/354Mx6/uxWCTq6ZMh1JcutjbVnDauYAmc63ARXa793j4g== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1727723768; 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=iCvcoZK/1u84ANwEMkWcEIyXDRG96pAVEQ+ONN9fVq4=; b=LzSX6w1KCMyStlPEYZz2PdVadv24ltBggYWSH7NJOFSXKkHbhvWBDpTDR7J0PNWEX23gko 9a03sH2Ia9XjYBBQ== To: Jeff Layton , John Stultz , Stephen Boyd , Alexander Viro , Christian Brauner , Jan Kara , Steven Rostedt , Masami Hiramatsu , Mathieu Desnoyers , Jonathan Corbet , Chandan Babu R , "Darrick J. Wong" , Theodore Ts'o , Andreas Dilger , Chris Mason , Josef Bacik , David Sterba , Hugh Dickins , Andrew Morton , Chuck Lever , Vadim Fedorenko Cc: Randy Dunlap , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-xfs@vger.kernel.org, linux-ext4@vger.kernel.org, linux-btrfs@vger.kernel.org, linux-nfs@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH v8 01/11] timekeeping: move multigrain timestamp floor handling into timekeeper In-Reply-To: References: <20240914-mgtime-v8-0-5bd872330bed@kernel.org> <20240914-mgtime-v8-1-5bd872330bed@kernel.org> <87a5g79aag.ffs@tglx> <874j6f99dg.ffs@tglx> Date: Mon, 30 Sep 2024 21:16:07 +0200 Message-ID: <878qv90x6w.ffs@tglx> Precedence: bulk X-Mailing-List: linux-doc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain On Mon, Sep 16 2024 at 06:57, Jeff Layton wrote: > On Mon, 2024-09-16 at 12:32 +0200, Thomas Gleixner wrote: >> > 'Something has changed' is a truly understandable technical >> > explanation. >> >> old = mg_floor >> mono = T1; >> mg_floor = mono >> preemption >> >> do { >> mono = T2; >> } >> >> cmpxchg fails and the function returns a value based on T1 >> >> No? >> >> > > Packing for LPC, so I can't respond to all of these just now, but I > will later. You're correct, but either outcome is OK. > > The requirement is that we don't hand out any values that were below > the floor at the time that the task entered the kernel. Since the time > changed while the task was already inside the kernel, either T1 or T2 > would be valid timestamps. That really needs to be documented. A similar scenario exists vs. ktime_get_coarse_real_ts64_mg(). Thanks, tglx