Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp178314ybb; Thu, 9 Apr 2020 20:24:17 -0700 (PDT) X-Google-Smtp-Source: APiQypJ5I0IFXFbzR3fnlcczCjTU0gjM4CIJOAw44oDNgmG0Qvwzzgp7xqgpkR6LcqWcak7S5JAh X-Received: by 2002:a37:4cd1:: with SMTP id z200mr1939878qka.324.1586489057180; Thu, 09 Apr 2020 20:24:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586489057; cv=none; d=google.com; s=arc-20160816; b=k2wYCxQdrRC5zpBGUU6ztv1Erk3HA1FOwnl6LIyR40cI3Bt3xrsTtgPUmAPPb2+cuC qiWEjbWx+Stu55eXluTcSShyTAbqDteGaxn4eJpibwM5Z78WyM40ix+Of4+HII6sz5hF cM9Y1Oc2/ZRcTBAc4+EH3kDE+VaASsVHGvUAAACk1cTkzsflROH62YR3osXpfYqpophj wV9Wf5q+SG3UhrwhMvoXrj6PovemZieo0MBEdNpCxUMgNJbuLML1EnThkpW5UNw9hYh/ NCOqAdbMha5Rzt+gKUEBygQiA0Zk+aFZvHg2QAdzvJ0x49G0WEnUo2nQ7RDO4hOvWlD3 eobw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=zc+Ku10JeFSYOv3KJZdTSgIYCqfNTkPc2vZhz0l0aoM=; b=UbIHLwr2safPeuXguHgF3MG+joV4wjq+E9RQuv6SA6qgpJVoRzY6WUj4A7Rnul3ezJ k/ts+WRspuZzR8Zze2iOzEEmQ58Zhqo3A9FNUfYwxckIUK/cDBfvJVl7WUJmnn2VhSFt wpZn8Eb7zQ1KyxUPNI29ynQmKCnr7YiYr3x823cbhEW4XQfZxlMCjTUQIrIjbVsL3Zuk 2t0IV6X2mj6slNoc2PzlyLcb4EJ/w5Irb8DqHfZkbsrynzeNeZ5n7l4WFOLUeepfb63z +dUYirwuYDIpVcysMUfHP29W9h3r+Lo9Gt657Zetzv4CKFqSxwy30K3fyRtgthP8evH9 MyjQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n6si131413qvl.45.2020.04.09.20.24.02; Thu, 09 Apr 2020 20:24:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726594AbgDJDX7 (ORCPT + 99 others); Thu, 9 Apr 2020 23:23:59 -0400 Received: from outgoing-auth-1.mit.edu ([18.9.28.11]:56086 "EHLO outgoing.mit.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726082AbgDJDX6 (ORCPT ); Thu, 9 Apr 2020 23:23:58 -0400 Received: from callcc.thunk.org (pool-72-93-95-157.bstnma.fios.verizon.net [72.93.95.157]) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 03A3Ni0m031164 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 9 Apr 2020 23:23:45 -0400 Received: by callcc.thunk.org (Postfix, from userid 15806) id 748E142013D; Thu, 9 Apr 2020 23:23:44 -0400 (EDT) Date: Thu, 9 Apr 2020 23:23:44 -0400 From: "Theodore Y. Ts'o" To: Roman Gushchin Cc: linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org, Alexander Viro , Andreas Dilger , Andrew Perepechko , Gioh Kim , Jan Kara Subject: Re: [PATCH v2] ext4: use non-movable memory for superblock readahead Message-ID: <20200410032344.GI45598@mit.edu> References: <20200229001411.128010-1-guro@fb.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200229001411.128010-1-guro@fb.com> Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Fri, Feb 28, 2020 at 04:14:11PM -0800, Roman Gushchin wrote: > Since commit a8ac900b8163 ("ext4: use non-movable memory for the > superblock") buffers for ext4 superblock were allocated using > the sb_bread_unmovable() helper which allocated buffer heads > out of non-movable memory blocks. It was necessarily to not block > page migrations and do not cause cma allocation failures. > > However commit 85c8f176a611 ("ext4: preload block group descriptors") > broke this by introducing pre-reading of the ext4 superblock. > The problem is that __breadahead() is using __getblk() underneath, > which allocates buffer heads out of movable memory. > > It resulted in page migration failures I've seen on a machine > with an ext4 partition and a preallocated cma area. > > Fix this by introducing sb_breadahead_unmovable() and > __breadahead_gfp() helpers which use non-movable memory for buffer > head allocations and use them for the ext4 superblock readahead. Applied, thanks. Apologies for not picking this up earlier. - Ted