Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1965615ybb; Thu, 9 Apr 2020 12:19:55 -0700 (PDT) X-Google-Smtp-Source: APiQypJw/Oenx4hX2TOlyvPA27F08HPN2RwVk+WLHOXPVF21U+YyP5hwCqwO56FWeYWIzUwwWF5A X-Received: by 2002:a37:6cc5:: with SMTP id h188mr394342qkc.389.1586459995180; Thu, 09 Apr 2020 12:19:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586459995; cv=none; d=google.com; s=arc-20160816; b=C0zATWTln/gr1Av0kpMFGF+aAlMbPOrVcoGemKG1VfJ8ie5UPWNSr7sv+OsOeq0Egu 56qfN8soeWOFlocmh2KJLF+lM8zdzEPHAAKI4D9H4/c/h0eLaDORb/kzeb660xqfuaHm iUZ3gJ9LK5AsLi9pqMrs+yf8TUl4pcLso03iJfEYpS6h6h8+blsNcATBczDPK0d4ZA+B ph80WsRsHUvRGX8Xch+S2KBdR8SzHfGALEMIyCMHdBglkB29l1Po/akOfq+LMebM18c+ 8vBJ41LiVJHCwP0BmF0PcvwX84x3vcJUpaneEixHjmOo6MbjI0d0fQ0gU2n2O9tceWeA 02TA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version; bh=Uv6LggaLYn4r1n/EUBykCuft7Catck/0U6K7eo8iayo=; b=lI6RjvcN53Jt6XSu/8mlzb9WrPE2CkZtwYQPWmm+mKR75BX7nefpakl6uIQ0U2F3mv Ybn95fHQXoIrtpJzRYZbbNn1b8jJxvXdeX8UZtdDDjDp/1K3299mH3nY1nTt5DZ7BbMa uGbWHMrun+DS++8OTaI/CoMoDRp6AsWh2x8l6a5xqfHsdr8+K78VopyBnx3AyMbpVTkv 97plj1OtDI1dKivfSTOKY9mZ3WEGwdx1M560Ka9IAq3TL9Sr8d656r3NC+1IhKsGFhqo jTAe2MzM5cPI+OOc4i3Y6UBz9g6AdR1whAbFr1b/8gs4/FRC4hCw166idIwE1rUdnzDn FF1g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=openvz.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t18si5799693qvs.71.2020.04.09.12.19.39; Thu, 09 Apr 2020 12:19:55 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=openvz.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726794AbgDITSE convert rfc822-to-8bit (ORCPT + 99 others); Thu, 9 Apr 2020 15:18:04 -0400 Received: from mail-oi1-f195.google.com ([209.85.167.195]:35246 "EHLO mail-oi1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726632AbgDITSE (ORCPT ); Thu, 9 Apr 2020 15:18:04 -0400 Received: by mail-oi1-f195.google.com with SMTP id b10so453262oic.2; Thu, 09 Apr 2020 12:18:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=QXRAlkJ3rCw/bTZOgIY7CDzFwnx0yQZmKTD1ENCI1IY=; b=FvT5SMe/hsClg5o4ADDGtCUC6bn/z7iu20pvFBtjTGQH9Ne+fgXU0KGY5WDCWndRC3 D7iY/YT42zFKWFQNcJFg11rdQejgTMxOiz4qz8vlBPF7yMLbILrcA1hgslObh5jCUNcC B+VNgVqyqOKAQh7mhMF0glpTSHAFUTlCaKqs9VK+t4+fB0/p09JHynBtIylMXQpK206E SMZ4AyOSSRWuNnHt5GzeDOtjbvnRxLV9hfLz4AvQAByq2jPiVFCx3BA/QgyP75ErWK43 mKcJ545rxImxEkD5QwN3sTHefCZ1y96WTIg9dmC0Hch8iVWUdTRiibzob3yLC0WgGyvh Skrw== X-Gm-Message-State: AGi0PuZihme8+y6H5heoSxCdM1jtr6PFsO9GEoZoZxsrt5NQAK+v4Ek4 Gnn9SYoD0S2B3J1jfQsFhIsr9Lai7Q4fvEOOgik= X-Received: by 2002:aca:da8b:: with SMTP id r133mr725258oig.81.1586459883987; Thu, 09 Apr 2020 12:18:03 -0700 (PDT) MIME-Version: 1.0 References: <703440af-031c-16b5-c1ff-54fb4bb5e10c@gmail.com> In-Reply-To: <703440af-031c-16b5-c1ff-54fb4bb5e10c@gmail.com> From: Andrey Vagin Date: Thu, 9 Apr 2020 12:17:52 -0700 Message-ID: Subject: Re: A further though on /proc/PID/timens_offsets To: "Michael Kerrisk (man-pages)" Cc: Dmitry Safonov , Linux API , Containers , Dmitry Safonov <0x7f454c46@gmail.com>, lkml , "Eric W. Biederman" , Andy Lutomirski , Thomas Gleixner , Adrian Reber Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 7, 2020 at 6:24 AM Michael Kerrisk (man-pages) wrote: > The clock-id identifies the clock whose offsets are being shown. > This field is either 1, for CLOCK_MONOTONIC, or 7, for CLOCK_BOOT‐ > TIME. > > What was the reason for exposing numeric clock IDs in the > timens_offsets file? In API terms, that seems a little ugly. > > I think it would have been much nicer if the clocks were defined > symbolically in this file. I.e., that reading the file would have > shown something like > > monotonic x y > boottime x y > > And that records similarly with symbolic clock names could have > been written to the file. Was there a reason not to do this? No, there was not except that I haven't thought about this. I agree that symbolic clock names looks nicer for humans, but numeric clock IDs are a bit more convenient when we need to set/read offsets from code. This interface is in the released kernel, so I think we can't change the format of the content of this file. But we can add support of symbolic clock names for setting clock offsets. What do you think? Thanks, Andrei