From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A16B9C433FF for ; Wed, 14 Aug 2019 22:49:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6BC8F2133F for ; Wed, 14 Aug 2019 22:49:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1565822972; bh=jivfAMepI0RUEpSZlQtSBIqThWImtRCXpi21oTCQTL4=; h=Date:From:To:Cc:Subject:In-Reply-To:References:List-ID:From; b=jctcTv5e+yQlYcApLm9wbSfIMXFhZ1ocFgMFiRjrG26JcCqzBsO1sjmB52fvYOwPY F7C3K25hlCSpzny4UVkPF96CUsWGJavzbI/CR2Y0eV43GpDTiDIl3wQ8TPKQSkvnNY Am6JCdNV2u1miMcHKe+Y1tsTQNSsfDYxkqfI4lQQ= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729037AbfHNWta (ORCPT ); Wed, 14 Aug 2019 18:49:30 -0400 Received: from mail.kernel.org ([198.145.29.99]:38650 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728214AbfHNWta (ORCPT ); Wed, 14 Aug 2019 18:49:30 -0400 Received: from localhost.localdomain (c-73-223-200-170.hsd1.ca.comcast.net [73.223.200.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A59C9208C2; Wed, 14 Aug 2019 22:49:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1565822969; bh=jivfAMepI0RUEpSZlQtSBIqThWImtRCXpi21oTCQTL4=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=AEyC3bO50FxmVPrQA2snFZCblJWdXrtODi/2F368XEFE6EwllYrn61TVyVwiklr+M 41FZYVj3/ITFicX9hQXRcaNzdphMeDFeC9pxp15jEgjtlDBTdxgeedz4+0+3rtiX+V SY8knh1Dj7cuDUsu2alp1f4KqD/Yd05rMFu6yrpU= Date: Wed, 14 Aug 2019 15:49:29 -0700 From: Andrew Morton To: David Rientjes Cc: Vlastimil Babka , Naoya Horiguchi , Mel Gorman , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [patch] mm, page_alloc: move_freepages should not examine struct page of reserved memory Message-Id: <20190814154929.f050d937f2bd2c4d80c7f772@linux-foundation.org> In-Reply-To: References: <20190813141630.bd8cee48e6a83ca77eead6ad@linux-foundation.org> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 13 Aug 2019 16:31:35 -0700 (PDT) David Rientjes wrote: > > > Move the debug checks to after verifying PageBuddy is true. This isolates > > > the scope of the checks to only be for buddy pages which are on the zone's > > > freelist which move_freepages_block() is operating on. In this case, an > > > incorrect node or zone is a bug worthy of being warned about (and the > > > examination of struct page is acceptable bcause this memory is not > > > reserved). > > > > I'm thinking Fixes:907ec5fca3dc and Cc:stable? But 907ec5fca3dc is > > almost a year old, so you were doing something special to trigger this? > > > > We noticed it almost immediately after bringing 907ec5fca3dc in on > CONFIG_DEBUG_VM builds. It depends on finding specific free pages in the > per-zone free area where the math in move_freepages() will bring the start > or end pfn into reserved memory and wanting to claim that entire pageblock > as a new migratetype. So the path will be rare, require CONFIG_DEBUG_VM, > and require fallback to a different migratetype. > > Some struct pages were already zeroed from reserve pages before > 907ec5fca3c so it theoretically could trigger before this commit. I think > it's rare enough under a config option that most people don't run that > others may not have noticed. I wouldn't argue against a stable tag and > the backport should be easy enough, but probably wouldn't single out a > commit that this is fixing. OK, thanks. I added the above two paragraphs to the changelog and removed the Fixes: Hopefully Mel will be able to review this for us.