Received: by 2002:a19:771d:0:0:0:0:0 with SMTP id s29csp1273847lfc; Wed, 1 Jun 2022 13:50:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy9tfPRsf3w5A5eOHwuJLoz2p0fUdqTXOp5xNGfICDTPJaLjEImVegl8YlTBlOhgFwsI4oD X-Received: by 2002:aa7:9a49:0:b0:51b:aa7f:d078 with SMTP id x9-20020aa79a49000000b0051baa7fd078mr5869118pfj.71.1654116648423; Wed, 01 Jun 2022 13:50:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654116648; cv=none; d=google.com; s=arc-20160816; b=UOfM0m7D8nKyOZiBze8khOFCqohD3kdgBXS+wVNwE8ojI+557d/pe0MykrX2sYAv+x fS8WUqhWboEocyQseB3QgkH3D+Qu4JZUpNxWlTFmj99o9v1pFCQgWanaEnXFycpUQhUp cezH7dM713jTKtLfrEZS7grvSnnMhb+MprEz3rQg0WM0AEkJD1K4Pid+FzrH4raGJeKC eTg3WLPQRBO+RaLPojCIqQBs24Cw6ETqAqQqaNGZ5f/hAhnIUnFQpo8Lq8YRscucqmlh kVGH7fRHKhOqrjBwrDTVklq/ddmXpPeVcAacsicPsWKvsRow1epunTxh95mTdyRPGZD5 MB3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dkim-signature; bh=nwAslF7UTAY2p7754DPU5vsb/l32RP5T/3fbTLG0DoM=; b=KJcOOJxutggA4dTjv9v29qcPCwQpJBw5g/o0hv4fvizzM07yTj4eVu+9/c7gQZAigo VU4ByMKknbsI8Woa2l2ecTjICjBwQjGqUlS9D0BtWZyeiWEF0SGDAljfR0xULo8Rhs9a fd30x33dknGD1nFynVLM9UWtxpXmErRFZ2IT2vsgsm8Aq9DB2AiY80Uc7xKY1H/zJ0zn c/fYjCAsHN0pV4bNRw4bNrDzpyG8CMsUKfRyAKkuCv2ypqvR8VziQ83AVpfFwI7PmYNm yZlNcK0kbNy3DyuVz9eciM8ViEnkQ+0ErFr0tX07wlirikMMzQvHW9YKf+iBY+/fmpUY civQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b=i2VdKbpC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=163.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id y2-20020a056a00180200b004faac3a73f4si3896952pfa.17.2022.06.01.13.50.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jun 2022 13:50:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b=i2VdKbpC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=163.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 9F05520BB0A; Wed, 1 Jun 2022 12:54:16 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345742AbiEaPhy (ORCPT + 99 others); Tue, 31 May 2022 11:37:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36988 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234153AbiEaPhu (ORCPT ); Tue, 31 May 2022 11:37:50 -0400 Received: from m12-11.163.com (m12-11.163.com [220.181.12.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id CA7174DF7F; Tue, 31 May 2022 08:37:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id; bh=nwAslF7UTAY2p7754D PU5vsb/l32RP5T/3fbTLG0DoM=; b=i2VdKbpCTnKfJjtwfOSEzUv2SoVaFgrNi1 wM+RTUNgXiVBh3nredQ3UGQmNgYAM6pGYAz0fZNdzAifBxi4HZAfhYGodyM0ijvw 4TYFH3y6riyGMCqQvSOKN1gjihB1PEh5rjWu05ZABW3bmQt4NK9lcwFd6e5kwRfv 8tOwbVGgM= Received: from localhost.localdomain (unknown [171.221.150.250]) by smtp7 (Coremail) with SMTP id C8CowAC325kMNpZiS1T3FQ--.58339S2; Tue, 31 May 2022 23:36:56 +0800 (CST) From: Chen Lin To: kuba@kernel.org Cc: akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, alexander.duyck@gmail.com, netdev@vger.kernel.org, Chen Lin Subject: Re:Re: [PATCH v2] mm: page_frag: Warn_on when frag_alloc size is bigger than PAGE_SIZE Date: Tue, 31 May 2022 23:36:22 +0800 Message-Id: <1654011382-2453-1-git-send-email-chen45464546@163.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <20220531081412.22db88cc@kernel.org> References: <20220531081412.22db88cc@kernel.org> X-CM-TRANSID: C8CowAC325kMNpZiS1T3FQ--.58339S2 X-Coremail-Antispam: 1Uf129KBjvdXoW7Xr4xJF4DZw1xtrykCw1rWFg_yoWDJwbE9F n7ZF1xArn8t3yxGa17Kr17urW2q3W09F12vrZI9a47tF98Awn8JFyDGFWfWrZ3tFZa9F9x CrnrG3W0qrya9jkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7sRRVc_5UUUUU== X-Originating-IP: [171.221.150.250] X-CM-SenderInfo: hfkh0kqvuwkkiuw6il2tof0z/1tbiGhgSnlaEB7qq2QAAsS X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 At 2022-05-31 22:14:12, "Jakub Kicinski" wrote: >On Tue, 31 May 2022 22:41:12 +0800 Chen Lin wrote: >> At 2022-05-31 02:29:18, "Jakub Kicinski" wrote: >> >Oh, well, the reuse also needs an update. We can slap a similar >> >condition next to the pfmemalloc check. >> >> The sample code above cannot completely solve the current problem. >> For example, when fragsz is greater than PAGE_FRAG_CACHE_MAX_SIZE(32768), >> __page_frag_cache_refill will return a memory of only 32768 bytes, so >> should we continue to expand the PAGE_FRAG_CACHE_MAX_SIZE? Maybe more >> work needs to be done > >Right, but I can think of two drivers off the top of my head which will >allocate <=32k frags but none which will allocate more. In fact, it is rare to apply for more than one page, so is it necessary to change it to support? we can just warning and return, also it is easy to synchronize this simple protective measures to lower Linux versions.