Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp5835015rwe; Tue, 18 Apr 2023 12:15:20 -0700 (PDT) X-Google-Smtp-Source: AKy350Z3jigHpWgs/VzuXDbSo2jvfqwMlidy2sLd3DPzoKTg8bNAIwkhn6Ua8tJXK4vtXqJRl3WE X-Received: by 2002:a05:6a00:a17:b0:635:d9e1:8e1e with SMTP id p23-20020a056a000a1700b00635d9e18e1emr805444pfh.11.1681845320523; Tue, 18 Apr 2023 12:15:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681845320; cv=none; d=google.com; s=arc-20160816; b=KF5m9bmRbjmNcErydIqdSkds0qTbq5ZvqyQdt1hxoaqegJQcXxm8VOSl7rMab+oL+W NuCzlVn/WLJ8HVnlGkNFR7Qnfr1YOU5nskIzdK9UYs8vWRaZF+jbhQOm3+vQFuFtHARA LF05swL2zUo9egU054W/FmoWKz8nyHYw5hBfbxVETNOyQJq9alOhSEi8EsWzfctPGQ9T DY2hnJrBmAXfI2NYGXdof5iGb4NnBF9kBohGweDBvwh5c8vAWW9NLISW84vpXfQTtctq 2GcWvZYz88i+L2zALzJLhNCNaywYRXMgDAxGl+cVLMBRxL9yBm3qwUplAZPMswoKwtBy xPWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=k7sno8AaRf5ATInZUw+i9Aey3v69SOK+YNtRO/2P9OU=; b=Hgo3eyp22+GFofoMSP2uzlWnZLpimou9SL256vR6/gd+Z8n3fpW6pNaLDYJ5EtGsC/ Dvg3B2jnMoxxk3Ec+nR3NLfXV5xEyvFU/+xNq0/VrJmqq5L+g8k5GHo/m8/TevaVbyfe c7ttksjVRidH8l/IsQ+ta81MAw8N1lFJ/PG3fRjqJIiD3y7ioDwuSJfw9gDib4LwXqHz NGeqZ9b9bBXzdjJr6KPduB6lBD8VHPiGOGT7B6N4zFiz9ipNA/FSEp10p3Bw33vqGtwE Z7qWNOgumINYnq/GkXtPDNXmeRmQ4DyjdF+eFeTGB/2C0VDDe1pLvqUpk4Ym5xhVD68F 9lpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cmpxchg-org.20221208.gappssmtp.com header.s=20221208 header.b=x7kihz2X; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=cmpxchg.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s7-20020a625e07000000b0063b7e907032si8590882pfb.271.2023.04.18.12.15.08; Tue, 18 Apr 2023 12:15:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@cmpxchg-org.20221208.gappssmtp.com header.s=20221208 header.b=x7kihz2X; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=cmpxchg.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232100AbjDRTNy (ORCPT + 99 others); Tue, 18 Apr 2023 15:13:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57036 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232874AbjDRTN3 (ORCPT ); Tue, 18 Apr 2023 15:13:29 -0400 Received: from mail-qv1-xf2e.google.com (mail-qv1-xf2e.google.com [IPv6:2607:f8b0:4864:20::f2e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 83ED4C66A for ; Tue, 18 Apr 2023 12:13:21 -0700 (PDT) Received: by mail-qv1-xf2e.google.com with SMTP id me15so9555374qvb.4 for ; Tue, 18 Apr 2023 12:13:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cmpxchg-org.20221208.gappssmtp.com; s=20221208; t=1681845200; x=1684437200; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=k7sno8AaRf5ATInZUw+i9Aey3v69SOK+YNtRO/2P9OU=; b=x7kihz2Xek9Oawcxi+XxZhyApuNkNkSuXAlGa0k24xE/zxYmZiL9Tjnypqyo29xZrW Nsmvw/Opca5Epg2iXzQaqdiJrL5rqFjWGypHqp5urO1vUn8xS+vqGK55FJzonBr1mCwf wGaiiiFg2tItrhXI7KwlkaJG/RDfu09WqpY33e+D80EVxDPradvBJJ12Je5vjNrE+TPi ts+YdchVOie8BtYVf5YyCDVqV+r9hhn3Nl1kzyCzI5gGydNCC6lEPeXQFfpGWMSh2+pi CGhIO6Il7AoD+ydlRVCr5v40EZuhLfXbDgvfOUIzqKX+MJNjjoo0qr3XT7MqqIkU6bO/ IqJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681845200; x=1684437200; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=k7sno8AaRf5ATInZUw+i9Aey3v69SOK+YNtRO/2P9OU=; b=NrTVueUMFASXhcrND38dhLe/koeJIvmgA8lq+TDM2rBb43oK/pKgidf8gEMMOwRIuQ cxz2uIydibwwg66ycuyaR3oLYy+CSwTzRI2IjuCqVtnbSzjC96a9FH8ZwAMvEJJWLWdr ThBu8+D3eHD47DsoS8IYZ4cLCSxLGazSlrX25Lww5a1J4H+iElMIK8vLln6STnbUs4+j 5C/01vgdD2IVFWSrR1PrUZrii65d5bkfCwNVA3sp7HirIJfZ8mzmZ9WgMldgYt4Me7na QaQodiEz0KMiN/hYd7SllEmIdKcjBPP7hTweriHljNV7oxf3Q52EP4tKPd5RB+yTT45z S9vA== X-Gm-Message-State: AAQBX9fihF4B3AVTid7L/Lbk1RdpjiY23/IgkYpDvzCIMipxuPJguJya pVwn7+b5dM4hhAAMziDkPtGQKA== X-Received: by 2002:a05:6214:c4b:b0:5ef:807b:2a96 with SMTP id r11-20020a0562140c4b00b005ef807b2a96mr11066482qvj.21.1681845200482; Tue, 18 Apr 2023 12:13:20 -0700 (PDT) Received: from localhost ([2620:10d:c091:400::5:e646]) by smtp.gmail.com with ESMTPSA id k21-20020a05620a0b9500b0074e04516389sm659536qkh.35.2023.04.18.12.13.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Apr 2023 12:13:20 -0700 (PDT) From: Johannes Weiner To: linux-mm@kvack.org Cc: Kaiyang Zhao , Mel Gorman , Vlastimil Babka , David Rientjes , linux-kernel@vger.kernel.org, kernel-team@fb.com Subject: [RFC PATCH 01/26] block: bdev: blockdev page cache is movable Date: Tue, 18 Apr 2023 15:12:48 -0400 Message-Id: <20230418191313.268131-2-hannes@cmpxchg.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230418191313.268131-1-hannes@cmpxchg.org> References: <20230418191313.268131-1-hannes@cmpxchg.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org While inspecting page blocks for the type of pages in them, I noticed a large number of blockdev cache in unmovable blocks. However, these pages are actually on the LRU, and their mapping has a .migrate_folio callback; they can be reclaimed and compacted as necessary. Put them into movable blocks, so they don't cause pollution, and subsequent proliferation, of unmovable blocks. Signed-off-by: Johannes Weiner --- block/bdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/bdev.c b/block/bdev.c index edc110d90df4..6abe4766d073 100644 --- a/block/bdev.c +++ b/block/bdev.c @@ -488,7 +488,7 @@ struct block_device *bdev_alloc(struct gendisk *disk, u8 partno) inode->i_mode = S_IFBLK; inode->i_rdev = 0; inode->i_data.a_ops = &def_blk_aops; - mapping_set_gfp_mask(&inode->i_data, GFP_USER); + mapping_set_gfp_mask(&inode->i_data, GFP_USER|__GFP_MOVABLE); bdev = I_BDEV(inode); mutex_init(&bdev->bd_fsfreeze_mutex); -- 2.39.2