Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760841AbaJ3SSc (ORCPT ); Thu, 30 Oct 2014 14:18:32 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:54523 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759304AbaJ3SSb (ORCPT ); Thu, 30 Oct 2014 14:18:31 -0400 Date: Thu, 30 Oct 2014 19:18:29 +0100 From: Pavel Machek To: Tina Ruchandani Cc: len.brown@intel.com, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, arnd@arndb.de, opw-kernel@googlegroups.com, rjw@rjwysocki.net Subject: Re: [PATCH] PM / Hibernate: Migrate to ktime_t Message-ID: <20141030181829.GB14412@amd> References: <20141030180453.GA55907@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20141030180453.GA55907@localhost> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu 2014-10-30 11:04:53, Tina Ruchandani wrote: > This patch migrates swsusp_show_speed and its callers to using ktime_t instead > of 'struct timeval' which suffers from the y2038 problem. > > Changes to swsusp_show_speed: > - use ktime_t for start and stop times > - pass start and stop times by value > Calling functions affected: > - load_image > - load_image_lzo > - save_image > - save_image_lzo > - hibernate_preallocate_memory > Design decisions: > - use ktime_t to preserve same granularity of reporting as before > - use centisecs logic as before to avoid 'div by zero' issues caused by > using seconds and nanoseconds directly > - use monotonic time (ktime_get()) since we only care about elapsed time. > > Signed-off-by: Tina Ruchandani > Suggested-by: Arnd Bergmann Acked-by: Pavel Machek -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/