From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S938761AbdAIQVo (ORCPT ); Mon, 9 Jan 2017 11:21:44 -0500 Received: from mga03.intel.com ([134.134.136.65]:12848 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934751AbdAIQV1 (ORCPT ); Mon, 9 Jan 2017 11:21:27 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,340,1477983600"; d="scan'208";a="28079926" Subject: Re: [HMM v15 01/16] mm/free_hot_cold_page: catch ZONE_DEVICE pages To: Balbir Singh , =?UTF-8?B?SsOpcsO0bWUgR2xpc3Nl?= References: <1483721203-1678-1-git-send-email-jglisse@redhat.com> <1483721203-1678-2-git-send-email-jglisse@redhat.com> <20170109091952.GA9655@localhost.localdomain> Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, John Hubbard , Dan Williams , Ross Zwisler From: Dave Hansen Message-ID: <591ef5e3-54a9-da61-bca6-f30641bebe88@intel.com> Date: Mon, 9 Jan 2017 08:21:25 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <20170109091952.GA9655@localhost.localdomain> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/09/2017 01:19 AM, Balbir Singh wrote: >> + /* >> + * This should never happen ! Page from ZONE_DEVICE always must have an >> + * active refcount. Complain about it and try to restore the refcount. >> + */ >> + if (is_zone_device_page(page)) { >> + VM_BUG_ON_PAGE(is_zone_device_page(page), page); > This can be VM_BUG_ON_PAGE(1, page), hopefully the compiler does the right thing > here. I suspect this should be a BUG_ON, independent of CONFIG_DEBUG_VM BUG_ON() means "kill the machine dead". Do we really want a guaranteed dead machine if someone screws up their refcounting?