From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752138AbdHPObV (ORCPT ); Wed, 16 Aug 2017 10:31:21 -0400 Received: from mga09.intel.com ([134.134.136.24]:43997 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751461AbdHPObU (ORCPT ); Wed, 16 Aug 2017 10:31:20 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,383,1498546800"; d="scan'208";a="1183384199" Date: Wed, 16 Aug 2017 22:33:02 +0800 From: Chen Yu To: Michal Hocko Cc: linux-mm@kvack.org, Andrew Morton , Mel Gorman , Vlastimil Babka , "Rafael J. Wysocki" , Len Brown , Dan Williams , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH][RFC v2] PM / Hibernate: Disable wathdog when creating snapshot Message-ID: <20170816143301.GA19921@yu-desktop-1.sh.intel.com> References: <1502859218-13099-1-git-send-email-yu.c.chen@intel.com> <20170816123359.GC32161@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170816123359.GC32161@dhcp22.suse.cz> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 16, 2017 at 02:33:59PM +0200, Michal Hocko wrote: > On Wed 16-08-17 12:53:38, Chen Yu wrote: > [...] > > @@ -2537,10 +2538,15 @@ void mark_free_pages(struct zone *zone) > > unsigned long flags; > > unsigned int order, t; > > struct page *page; > > + bool wd_suspended; > > > > if (zone_is_empty(zone)) > > return; > > > > + wd_suspended = lockup_detector_suspend() ? false : true; > > + if (!wd_suspended) > > + pr_warn_once("Failed to disable lockup detector during hibernation.\n"); > > + > > spin_lock_irqsave(&zone->lock, flags); > > > > max_zone_pfn = zone_end_pfn(zone); > > I am not maintainer of this code so I am not very familiar with the full > context of this function but lockup_detector_suspend is just too heavy > for the purpose you are trying to achive. Really why don't you just > poke the watchdog every N pages? OK, I'll send another version. Thanks, Yu > -- > Michal Hocko > SUSE Labs