Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752869AbcKGLcI (ORCPT ); Mon, 7 Nov 2016 06:32:08 -0500 Received: from mail-wm0-f67.google.com ([74.125.82.67]:33677 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752729AbcKGLcG (ORCPT ); Mon, 7 Nov 2016 06:32:06 -0500 Date: Mon, 7 Nov 2016 14:29:00 +0300 From: "Kirill A. Shutemov" To: Hugh Dickins Cc: Andrew Morton , "Kirill A. Shutemov" , linux-kernel@vger.kernel.org, linux-mm@kvack.org, intel-gfx@lists.freedesktop.org Subject: Re: [PATCH] shmem: fix pageflags after swapping DMA32 object Message-ID: <20161107112900.GC13280@node.shutemov.name> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23.1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 995 Lines: 23 On Sun, Nov 06, 2016 at 08:08:29PM -0800, Hugh Dickins wrote: > If shmem_alloc_page() does not set PageLocked and PageSwapBacked, then > shmem_replace_page() needs to do so for itself. Without this, it puts > newpage on the wrong lru, re-unlocks the unlocked newpage, and system > descends into "Bad page" reports and freeze; or if CONFIG_DEBUG_VM=y, > it hits an earlier VM_BUG_ON_PAGE(!PageLocked), depending on config. > > But shmem_replace_page() is not a common path: it's only called when > swapin (or swapoff) finds the page was already read into an unsuitable > zone: usually all zones are suitable, but gem objects for a few drm > devices (gma500, omapdrm, crestline, broadwater) require zone DMA32 > if there's more than 4GB of ram. > > Fixes: 800d8c63b2e9 ("shmem: add huge pages support") > Cc: stable@vger.kernel.org # v4.8 > Signed-off-by: Hugh Dickins Sorry for that. Acked-by: Kirill A. Shutemov -- Kirill A. Shutemov