From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-f200.google.com (mail-pl1-f200.google.com [209.85.214.200]) by kanga.kvack.org (Postfix) with ESMTP id BD16B6B000D for ; Fri, 5 Oct 2018 17:21:45 -0400 (EDT) Received: by mail-pl1-f200.google.com with SMTP id bh1-v6so12422238plb.15 for ; Fri, 05 Oct 2018 14:21:45 -0700 (PDT) Received: from mail.linuxfoundation.org (mail.linuxfoundation.org. [140.211.169.12]) by mx.google.com with ESMTPS id x27-v6si9883648pff.196.2018.10.05.14.21.44 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 05 Oct 2018 14:21:44 -0700 (PDT) Date: Fri, 5 Oct 2018 14:21:43 -0700 From: Andrew Morton Subject: Re: [patch] mm, page_alloc: set num_movable in move_freepages() Message-Id: <20181005142143.30032b7a4fb9dc2b587a8c21@linux-foundation.org> In-Reply-To: References: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: David Rientjes Cc: Vlastimil Babka , Greg Thelen , linux-kernel@vger.kernel.org, linux-mm@kvack.org On Fri, 5 Oct 2018 13:56:39 -0700 (PDT) David Rientjes wrote: > If move_freepages() returns 0 because zone_spans_pfn(), *num_movable can move_free_pages_block()? !zone_spans_pfn()? > hold the value from the stack because it does not get initialized in > move_freepages(). > > Move the initialization to move_freepages_block() to guarantee the value > actually makes sense. > > This currently doesn't affect its only caller where num_movable != NULL, > so no bug fix, but just more robust. > > ...