Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1019905pxk; Mon, 31 Aug 2020 07:46:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwtnPZiCWIQFNcoCtusu0pQmnUNhr7HQKVLfU2/8Ayg2ltLuyMgLR4v+10PPiPseMdwIbNw X-Received: by 2002:aa7:c60a:: with SMTP id h10mr1645027edq.140.1598885202862; Mon, 31 Aug 2020 07:46:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598885202; cv=none; d=google.com; s=arc-20160816; b=ZKUU7Fs7EVxYUpdXNtAl4krkH1A5WInZ0oQbRPagVP2f5yy+LyzKKjX5pJgEQWr6Z+ msTzZdiAV1Z1ppxnEcOWBhVPHhS+WwjAq2xfYebB8TRNA4dt3JA2TF3lqubpAxApE2oy t//wADXx5ZQHCpnUJAxMngRdazYtXp+YZsN9Yhw0hhnIT2vRDkfvyrT3HAWx5/AUodJh wvYuNeL6ZzNs7d3Z+kqgeK9UDMiOP9p5iTitcTn+SBJUvzKOZ+wx0Wq3vnzf/CNCwJa3 ksdOmdlNY7OF1PNNIbLbUoQFf/8p7SrXSGS8zHCY0TsyBXbm7P0U1jRgYa1oVeHfXxCP 7FYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=5jdf7Yr1a6XX4TRwS1JHRRHr0CFyp0wrlJUOIn8FHr8=; b=duzCabGfG8GKsxuCGy9wQveF9DXRvxrb5g75tUubjBNPuVqM+FxZasNsPUZ1rKX6FN jX4v4o28pmjNvGqIfj7T9qpmUNtkAoxlguC+BgLGLqVIWQIJY7bncP7U9fQ19nRDadQI oqTG3mzM0eKcUyPU6SYvnW+w/BtrxWZqduw0sPjmzEHuxMA7Wo+4a28NrPRkqjRY9lKG EufeNbRscdvCFavmBkfBvSRWYtC3hWSj37he6GbUwnxFlU3bFg+B9PCKhveaaxVz/Vn4 14h39kR+vN/Rmjdl6AH8xlQpoLIUWMMvWdWP+TO0/mIOjvY0/VEUpECOYhGG0IsFlWnw BvGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="aH/j8WKX"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g16si5751570ejf.103.2020.08.31.07.46.17; Mon, 31 Aug 2020 07:46:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="aH/j8WKX"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728074AbgHaOlV (ORCPT + 99 others); Mon, 31 Aug 2020 10:41:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47642 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726489AbgHaOlT (ORCPT ); Mon, 31 Aug 2020 10:41:19 -0400 Received: from mail-lf1-x144.google.com (mail-lf1-x144.google.com [IPv6:2a00:1450:4864:20::144]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 96746C061573 for ; Mon, 31 Aug 2020 07:41:18 -0700 (PDT) Received: by mail-lf1-x144.google.com with SMTP id j15so3624504lfg.7 for ; Mon, 31 Aug 2020 07:41:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=5jdf7Yr1a6XX4TRwS1JHRRHr0CFyp0wrlJUOIn8FHr8=; b=aH/j8WKXZPdvikd5WEObfSDw9GR1wJDjg8Q3jQu4nRVY9eQMhZVxWM6/5we9KIEqbG dEL/W1lGnc4l5SckXCn8cshObUaR3qEffqA4aJ1jnqH+OHCZQA0TjM7SyTFMRscUPOqU p9+/ggGI6gxE5rfLwBkj2Pd9U7EfrTXd7A2ff4+FhWHr8PSG+gcNWLoibjGbSQTcHBNt kLxaT7IxEGAYoT1p4dkzBiY9HqNaZ3YL4qctWQ8QDjbfiqLje6MQtdUr0x5L25/dXVDw xx8fbfrVbGopBll7Hf8nNsmdFOuFyWnUA8itQlXufL86bh3cM9BfEEF1jBSp4pnucC7Y 18FA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=5jdf7Yr1a6XX4TRwS1JHRRHr0CFyp0wrlJUOIn8FHr8=; b=UgXZYpqgUsAkMWmCSi81yas/STj0N4kLkw+f/O6InAKgp5bnAQB0S5kB/5zTHGZsZX 5kLq3yZYT50uIy0TrWSzDT+jJXi8umMuLMGmR7cp96Oe7CxBrtb3MoGY3E2cxeeUjymC NAPiYqVn+EmKMFFKd74Fi4/4ppXybCI/yMFW+eSpOOcM1+SohSHqjyHdCn602O7FuRER f/NTi+rUB+7SXzPEOUgR6vXdg2TGFWLqPILP+T2+j83xWPnSyyQ0XNdu+0+Lwd6xN2j+ IGbrBDmRPbs0xjrdorKySq/ugYyMW8rVnwtPHAi3QpZI89ViL5dopp6dZD+ZAcuwE+3Z KIEw== X-Gm-Message-State: AOAM53173R4UwAkzk8q4D0g+We2EU/m8M2dnkp+iPKcxxIfO1wbKDYC5 bxeJ6xGqu0jaEp2Mabiq/NNw/RB8/CxXq0xfY5nMCg== X-Received: by 2002:ac2:47ec:: with SMTP id b12mr889283lfp.124.1598884876690; Mon, 31 Aug 2020 07:41:16 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Shakeel Butt Date: Mon, 31 Aug 2020 07:41:05 -0700 Message-ID: Subject: Re: [PATCH 3/5] shmem: shmem_writepage() split unlikely i915 THP To: Hugh Dickins Cc: Andrew Morton , Alex Shi , Johannes Weiner , Michal Hocko , Mike Kravetz , Matthew Wilcox , Qian Cai , Chris Wilson , Kuo-Hsin Yang , LKML , Linux MM Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Aug 30, 2020 at 2:04 PM Hugh Dickins wrote: > > drivers/gpu/drm/i915/gem/i915_gem_shmem.c contains a shmem_writeback() > which calls shmem_writepage() from a shrinker: that usually works well > enough; but if /sys/kernel/mm/transparent_hugepage/shmem_enabled has > been set to "force" (documented as "Force the huge option on for all - > very useful for testing"), shmem_writepage() is surprised to be called > with a huge page, and crashes on the VM_BUG_ON_PAGE(PageCompound) (I > did not find out where the crash happens when CONFIG_DEBUG_VM is off). > > LRU page reclaim always splits the shmem huge page first: I'd prefer not > to demand that of i915, so check and split compound in shmem_writepage(). > > Fixes: 2d6692e642e7 ("drm/i915: Start writeback from the shrinker") > Signed-off-by: Hugh Dickins > Cc: stable@vger.kernel.org # v5.3+ Reviewed-by: Shakeel Butt