From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752670AbcFKVBX (ORCPT ); Sat, 11 Jun 2016 17:01:23 -0400 Received: from mout.kundenserver.de ([212.227.126.130]:61341 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752092AbcFKVBV (ORCPT ); Sat, 11 Jun 2016 17:01:21 -0400 From: Arnd Bergmann To: Deepa Dinamani Cc: Bob Copeland , Linux FS-devel Mailing List , Linux Kernel Mailing List , Thomas Gleixner , Al Viro , Linus Torvalds , y2038@lists.linaro.org, Artem Bityutskiy , Adrian Hunter , linux-mtd , Evgeniy Dushistov , OGAWA Hirofumi , Jan Kara , linux-ext4@vger.kernel.org, David Howells , linux-afs@lists.infradead.org, "Tigran A. Aivazian" , "Theodore Ts'o" , Andreas Dilger , Jan Kara , Jan Harkes , coda@cs.cmu.edu, linux-karma-devel@lists.sourceforge.net, Christoph Hellwig Subject: Re: [PATCH 01/21] fs: Replace CURRENT_TIME_SEC with current_fs_time() Date: Sat, 11 Jun 2016 22:55:52 +0200 Message-ID: <6859475.Y26Py76amW@wuerfel> User-Agent: KMail/5.1.3 (Linux/4.4.0-22-generic; KDE/5.18.0; x86_64; ; ) In-Reply-To: References: <1465448705-25055-1-git-send-email-deepa.kernel@gmail.com> <3091973.UMxUogx2eG@wuerfel> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:tBX4mBTTzvwUOdACBVCf61Meb7/s6kBfGRn1pJG8UhRvF9mHBpU XPMPrHSsnFGafYIP7ZqHGEtJEL9s/3rkxlVpq3hZ48SmNkFGEG3zA6zqdtjMP9N7o0vpbbG uQQYJNyD5Zyv2wsBe/hrF/Vm9SaYcoDtsR+EG121xxb8LI2+v0YTgDgMSabfIICGoy3F3Cu Ys1skTZ9UW7Nfyw3Xfimg== X-UI-Out-Filterresults: notjunk:1;V01:K0:usSaAbxPT3c=:NzEqc0Av7k6dnzBoK4vKI8 U7ubWPgZizcc54o1Zx+W1dWZP+y6GPydox/uccnIzlbLswTKSAkKsrroHnQdBPf4ujNWMu/9Z U9by9CnNwLzEfEmgIEIqZgYm7sWiS9U5aPXlmQlIz9KFxrd//waOHV46BujhCH6UCMfkuJB53 gDVdRdq8ctaq4E9WWoMP256AoBcAi/HAqcF9azvkw3xBuOpnlbNHl5ETbwmM9I+mETjPp2DNp DdHuj7vOdM4dstXm0s2IeI3G+zyjClkB7OqEPzvY1DsJx79a8rsTon3XcRas/ZoHLVhTLjwQw 2CQEUWEm5lrxoOYi4oorP51QgThus8PVnzL/PXfDAjYeBknA45/tkEsk3h+FxjdyfqbcLzyzP gdnoCWDuw3FwHrtos6u8etNMeItqwWi1E5Wb1Wl74fJLPXsJ/7JrWzrBHSsG4ELe1BgPGEVen HapatKXV5TyRxs2vGNnpO9z1JDMAJDsEBZ5CBf1Jeg3EkRw1NFRjhkw2jZ4AwztUw0xkxj9nJ X5nuAgtds4nQAqXDonYNpEO0cdkWjN1tPEyRa685kWsZdOh/oImdKpcwoNLlA01/leJAjq105 /hTRSkNpWlui1xi2WkEs9bMWwSFflCaaLDEH4Yq5omvQHMcEkg91naBRtEPsPARBeQ+A2Rk6X VlwqUbsekAKKUZ7w8RXic5GSM+6DBnPPzQbyIMHwkPuqRlPtkR70rpXqLl10CQcb8NMSz8pZf g4G54xkHUj2Gcwct Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Friday, June 10, 2016 10:03:14 PM CEST Deepa Dinamani wrote: > On Fri, Jun 10, 2016 at 3:21 PM, Arnd Bergmann wrote: > > > > In an earlier version, you had a small optimization to > > use ktime_get_real_seconds() instead of current_kernel_time() > > when the granularity is seconds. > > > > Do you still plan to send that one, or did you decide we don't > > need it? > > I was actually planning to use get_seconds() instead of current_kernel_time(). > And, transition both along with vfs to y2038 safe apis. > Difference between ktime_get_real_seconds() and current_kernel_time64() > is not much because they both require sequence counter. > > It didn't make sense to me to optimize current_fs_time() for seconds > only, and not optimize for 1ns granularity also. Ah, you are right: adding another check for second granularity would probably cost more than it would save, since we already don't calculate the exact nanoseconds but just use the timestamp of the last timer tick. > I plan to make changes to the function depending on how we end up > using timespec_trunc() after the addition of range checking. Makes sense. I guess we can skip the range checking for current_fs_time() if we end up not allowing writable mounts on file systems that cannot represent the current time, but we do want the range checking for the other users of timespec_trunc(). Arnd