From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752962AbcAMG1z (ORCPT ); Wed, 13 Jan 2016 01:27:55 -0500 Received: from ipmail04.adl6.internode.on.net ([150.101.137.141]:28503 "EHLO ipmail04.adl6.internode.on.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750885AbcAMG1x (ORCPT ); Wed, 13 Jan 2016 01:27:53 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2AnEAD57ZVWPGu7LXleKAECgw+BP4Jig36BeZ9rAQEBAQEBBotdiUOGCQQCAoEmTQEBAQEBAQcBAQEBQT9BEgGDYAEBAQMBJxMcIwULCAMYCSUPBSUDBxoTG4gLB8AAAQEBAQYCASAZhXWFR4k9BZcVjVGPCY5UgnIfgXEqNIQVggcBAQE Date: Wed, 13 Jan 2016 17:27:16 +1100 From: Dave Chinner To: Arnd Bergmann Cc: y2038@lists.linaro.org, Deepa Dinamani , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [Y2038] [RFC 02/15] vfs: Change all structures to support 64 bit time Message-ID: <20160113062716.GJ6033@dastard> References: <1452144972-15802-1-git-send-email-deepa.kernel@gmail.com> <20160112054235.GA63984@myubuntu.deepaubuntu.g7.internal.cloudapp.net> <20160112082957.GG6033@dastard> <4788428.RCG4WOvRdT@wuerfel> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4788428.RCG4WOvRdT@wuerfel> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 12, 2016 at 10:27:07AM +0100, Arnd Bergmann wrote: > On Tuesday 12 January 2016 19:29:57 Dave Chinner wrote: > > > > This is what I meant about premature optimisation - you've got a > > wonderfully complex solution to a problem that we don't need to > > solve to support timestamps >y2038. It's also why it goes down the > > wrong path at this point - most of the changes are not necessary if > > all we need to do is a simple timespec -> timespec64 type change and > > the addition timestamp range limiting in the existing truncation > > function... > > I originally suggested doing the split representation because I > was worried about the downsides of using timespec64 on 32-bit systems > after looking at actual memory consumption on my test box. > > At this moment, I have a total of 145712700 inodes in memory on a machine Is that all? :P > with 64GB ram, saving 12 bytes on each amounts to a total of 145MB. I just posted a patchset that knocks 104 bytes off the XFS inode (~12% reduction in size). We need the changes in that patchset to sanely support >y2038k support in XFS, and it means we now won't need to grow the XFS inode to add that support, either. > I think > it was more than that when I first looked, so it's between 0.2% and 0.3% > of savings in total memory, which is certainly worth discussing about, > given the renewed interest in conserving RAM in general. If we want to > save this memory, then doing it at the same time as the timespec64 conversion > is the right time so we don't need to touch every file twice. You just uttered the key words: "If we want to save this memory" So let's stop conflating two different lines of development because we only actually *need* y2038k support. The fact we haven't made timestamp space optimisations means that nobody has thought it necessary or worthwhile. y2038k support doesn't change the landscape under which we might consider the optimisation, so we need to determine if the benefit outweighs the cost in terms of code complexity and maintainability. So separate the two changes - make the y2038k change simple and obviously correct first by changing everything to timespec64. Then it won't get delayed by bikeshedding about an optimisation of that is of questionable benefit. Cheers, Dave. -- Dave Chinner david@fromorbit.com