From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753279AbcD0L7I (ORCPT ); Wed, 27 Apr 2016 07:59:08 -0400 Received: from mx2.suse.de ([195.135.220.15]:51127 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752440AbcD0L7H (ORCPT ); Wed, 27 Apr 2016 07:59:07 -0400 Subject: Re: [PATCH 27/28] mm, page_alloc: Defer debugging checks of freed pages until a PCP drain To: Mel Gorman , Andrew Morton References: <1460710760-32601-1-git-send-email-mgorman@techsingularity.net> <1460711275-1130-1-git-send-email-mgorman@techsingularity.net> <1460711275-1130-15-git-send-email-mgorman@techsingularity.net> Cc: Jesper Dangaard Brouer , Linux-MM , LKML From: Vlastimil Babka Message-ID: <5720A987.7060507@suse.cz> Date: Wed, 27 Apr 2016 13:59:03 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: <1460711275-1130-15-git-send-email-mgorman@techsingularity.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/15/2016 11:07 AM, Mel Gorman wrote: > Every page free checks a number of page fields for validity. This > catches premature frees and corruptions but it is also expensive. > This patch weakens the debugging check by checking PCP pages at the > time they are drained from the PCP list. This will trigger the bug > but the site that freed the corrupt page will be lost. To get the > full context, a kernel rebuild with DEBUG_VM is necessary. > > Signed-off-by: Mel Gorman I don't like the duplicated code in free_pcp_prepare() from maintenance perspective, as Hugh just reminded me that similar kind of duplication between page_alloc.c and compaction.c can easily lead to mistakes. I've tried to fix that, which resulted in 3 small patches I'll post as replies here. Could be that the ideas will be applicable also to 28/28 which I haven't checked yet.