Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp1348829ybg; Wed, 23 Oct 2019 14:22:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqwU2D7sQrxJY+R32b+mMI/+szMIvVfPRXKEKL77KyfxsAIGM7apgeSRG69Bn5eBQuuQ8QGP X-Received: by 2002:a50:fc18:: with SMTP id i24mr16570653edr.42.1571865725953; Wed, 23 Oct 2019 14:22:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571865725; cv=none; d=google.com; s=arc-20160816; b=YVZyQzovcCQ/odKYnAaZje4ShAhR8YFxn4PNExxxCASiBg2BzRyB0n05VwcOnnHQWZ pJrYuFhkomNop/JLZwZBNj2yvsZyQ6LDBq1u0f8LVjTpvMmEw1JkzLp5oBkPf7UlCJ6E tkTV+8l/l+WY6FfaJRm38hblCDxDvr4YKYBBauaC49cLYytG0L0OeWN5/Mr9WngCCEnh jZOuOoZP2Ulimzdw3bWLokNGIMHYGMXOasU0XIcF/T6AD00G24UfTmTvtJPY6x9M78Yg Z2nZtZpVdVoTwPjC5GN1+5vltoRdAkAr6oizGGjOsb5Rwt2ELO4nfAgRfwJlp1lUJMW3 KwvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=DhlTZtkoOrFbvdr3xlnE+Z8xm92jEc+nNn8ssFv6qfI=; b=QdVbsg9uAtJOvP1xwZHX3jq5VL8uuu4YFUgmxIfjaLV+/Eu3s1D0Rnvma6C1ERkLXq /6tj4S0S8HEZdhCwXCidR83Aii5cM0WZQ9fBAioun0P1oS9PF7FzrrP/CPcx3EXDBX9Q WaAq+xGbaNW5XPJ2mdMSos8uLvypnhKqi4vfGj65Ndtbp2aO1nPIDiBBa2MMGuYpbb5J aiYtH7DfyZIflkPkZ/HNQZHb10xGd4Mp3/+Q7TmvsHsqKWPd6gFuehNBJJulIomeN1hy x3GrQFebjwaZzFdpQbxcXNKaUMrbYzO8RgFUF6Ujn5mledy6kb0giico1pHa1CNcI8J+ CIug== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e7si13767211ejk.20.2019.10.23.14.21.41; Wed, 23 Oct 2019 14:22:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2405561AbfJWNPT (ORCPT + 99 others); Wed, 23 Oct 2019 09:15:19 -0400 Received: from mx2.suse.de ([195.135.220.15]:35604 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730450AbfJWNPS (ORCPT ); Wed, 23 Oct 2019 09:15:18 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id E45C7B2F5; Wed, 23 Oct 2019 13:15:16 +0000 (UTC) Date: Wed, 23 Oct 2019 14:15:14 +0100 From: Mel Gorman To: Michal Hocko Cc: Andrew Morton , Waiman Long , Johannes Weiner , Roman Gushchin , Vlastimil Babka , Konstantin Khlebnikov , Jann Horn , Song Liu , Greg Kroah-Hartman , Rafael Aquini , linux-mm@kvack.org, LKML , Michal Hocko Subject: Re: [RFC PATCH 2/2] mm, vmstat: reduce zone->lock holding time by /proc/pagetypeinfo Message-ID: <20191023131514.GC28938@suse.de> References: <20191023095607.GE3016@techsingularity.net> <20191023102737.32274-1-mhocko@kernel.org> <20191023102737.32274-3-mhocko@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <20191023102737.32274-3-mhocko@kernel.org> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 23, 2019 at 12:27:37PM +0200, Michal Hocko wrote: > From: Michal Hocko > > pagetypeinfo_showfree_print is called by zone->lock held in irq mode. > This is not really nice because it blocks both any interrupts on that > cpu and the page allocator. On large machines this might even trigger > the hard lockup detector. > > Considering the pagetypeinfo is a debugging tool we do not really need > exact numbers here. The primary reason to look at the outuput is to see > how pageblocks are spread among different migratetypes therefore putting > a bound on the number of pages on the free_list sounds like a reasonable > tradeoff. > > The new output will simply tell > [...] > Node 6, zone Normal, type Movable >100000 >100000 >100000 >100000 41019 31560 23996 10054 3229 983 648 > > instead of > Node 6, zone Normal, type Movable 399568 294127 221558 102119 41019 31560 23996 10054 3229 983 648 > > The limit has been chosen arbitrary and it is a subject of a future > change should there be a need for that. > > Suggested-by: Andrew Morton > Signed-off-by: Michal Hocko You could have used need_resched() instead of unconditionally dropping the lock but that's very minor for a proc file and it would allos a parallel allocation to go ahead so Acked-by: Mel Gorman -- Mel Gorman SUSE Labs