From patchwork Wed Mar 4 15:22:43 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tejun Heo X-Patchwork-Id: 5937211 Return-Path: X-Original-To: patchwork-linux-fsdevel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 3A25A9F36A for ; Wed, 4 Mar 2015 15:23:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6796F201BC for ; Wed, 4 Mar 2015 15:23:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8E832201F5 for ; Wed, 4 Mar 2015 15:23:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758635AbbCDPWs (ORCPT ); Wed, 4 Mar 2015 10:22:48 -0500 Received: from mail-qc0-f180.google.com ([209.85.216.180]:44087 "EHLO mail-qc0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758542AbbCDPWr (ORCPT ); Wed, 4 Mar 2015 10:22:47 -0500 Received: by qcxn11 with SMTP id n11so9684867qcx.11; Wed, 04 Mar 2015 07:22:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:mime-version:content-type :content-disposition:user-agent; bh=QHdwtDRfGlzGYDwYGxTo9Y/HMVkLxZ1H/er81gL19zw=; b=xYPNdnFqrdZlT+206MW9yQM8FiRS1f6/jQyj/igif2dy0UruYXy9DIzTZRUESL+Wv8 QTzentUymEIJG9R3WVmgKJIpyb7ISmt5bVWysm93X2T3Xw+4L7si90VtT0hWWv5YuUiv snQddLydEqsxUV+e7qJfdG0OrK+F6AF4h4YjgsSr19fF32KnUl4+L000iTOocoZjW2Zm G5aruyS4LLzTvcCIHH7TmLXUCae5eiYMIvPy0Px2tBvlelStRNOezexMbtsHGIBftSxF 7QKPEvvu45sb43peGcsB2O8NockmWz9i+GEMU8r/5fYWYOArOGK2hDY7qfKW1nEjVmOt gCmQ== X-Received: by 10.55.31.168 with SMTP id n40mr8009618qkh.76.1425482566265; Wed, 04 Mar 2015 07:22:46 -0800 (PST) Received: from htj.duckdns.org (207-38-238-8.c3-0.wsd-ubr1.qens-wsd.ny.cable.rcn.com. [207.38.238.8]) by mx.google.com with ESMTPSA id w21sm2371232qgd.15.2015.03.04.07.22.44 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 04 Mar 2015 07:22:45 -0800 (PST) Date: Wed, 4 Mar 2015 10:22:43 -0500 From: Tejun Heo To: Jens Axboe Cc: Wu Fengguang , Jan Kara , linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org Subject: [PATCH block/for-4.0-fixes] writeback: add missing INITIAL_JIFFIES init in global_update_bandwidth() Message-ID: <20150304152243.GG3122@htj.duckdns.org> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID,T_RP_MATCHES_RCVD,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP global_update_bandwidth() uses static variable update_time as the timestamp for the last update but forgets to initialize it to INITIALIZE_JIFFIES. This means that global_dirty_limit will be 5 mins into the future on 32bit and some large amount jiffies into the past on 64bit. This isn't critical as the only effect is that global_dirty_limit won't be updated for the first 5 mins after booting on 32bit machines, especially given the auxiliary nature of global_dirty_limit's role - protecting against global dirty threshold's sudden dips; however, it does lead to unintended suboptimal behavior. Fix it. Signed-off-by: Tejun Heo Cc: Wu Fengguang Cc: Jan Kara Cc: Jens Axboe Cc: stable@vger.kernel.org Reviewed-by: Jan Kara --- mm/page-writeback.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- a/mm/page-writeback.c +++ b/mm/page-writeback.c @@ -922,7 +922,7 @@ static void global_update_bandwidth(unsi unsigned long now) { static DEFINE_SPINLOCK(dirty_lock); - static unsigned long update_time; + static unsigned long update_time = INITIAL_JIFFIES; /* * check locklessly first to optimize away locking for the most time