Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp301441rdb; Thu, 16 Nov 2023 21:44:02 -0800 (PST) X-Google-Smtp-Source: AGHT+IE7KaLm5Ll1yeDAFZosR0isYIXRQdP7iXX2zRR+BpQD0LyWGQh6HZdoRWXdFD/4/zJw1huW X-Received: by 2002:a05:6808:1794:b0:3ae:4cb2:fb43 with SMTP id bg20-20020a056808179400b003ae4cb2fb43mr25621204oib.21.1700199842097; Thu, 16 Nov 2023 21:44:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700199842; cv=none; d=google.com; s=arc-20160816; b=f6BuKKNsw432uWcPBo4WK6LSBcIqW1/YmB7UKgJcXsJrLNsLLrI4xSXmlLNNWkWcuF DCHgd2Cs6mIFpX/aiZL7ieNgCrG2sBmRrQMtH6JuSK5cNEwefXUDQOY93i4OIMUvKekZ lzyKJK+F+Pa5kzah4JflAfuuVmd7ynWhfg0pKmgqFOmf8vZ2l7WoSAdgSiHKTJH2vAEQ LeScp2//57xuRdtgtPonIVVL0Cj51EiARYdKDYi8uzyxL2bHJluZCI1UJHWTtC790IGS 6xjNuSxBd5X99wqq8MQX1QkwcUan65ekA4ptfthDtIE3KRzdnhd4hTDhp7qLq4Rm2bIZ yvgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=EwGl2Raou1wlZbgyA4gj3IIYc9SXGYbAdpUH+BDajbQ=; fh=XzNtD0CTD/4ixL38bowwGXpiW0KYNtElb8o3DqQ6IVM=; b=YwgdFredHzo9lJ04kEPxqcbit/UXPUWSX3AeUBnSZJY8CLRiqvoGs3a3ABjh5SsVN1 w9tFOGyWvLylEoxThjXWK1qNH76WNJFctHxUBrwj61MTgW05mPdK88xU7cfv3XFqPzew 8Ex6KKtSxfGOu+/iN4xxU+BU2vmdl6s5lJFbMuIEWMhT3BFvCbZHK+To/z4/541pu4L3 ir1aKH1DtOD9Tgnlsx74od0FDCwCAkMrU2yVDrw6uZ6d1YPZdVo7Tz4CUlAYNxhRrXbr e64vvcoS3sbvIySoyMiNy5cz/YnxtYbhwegY2PMPU77i0bMSWbjGzuDseEicSwq++McS qFVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=M54trlkb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id 195-20020a6300cc000000b005b8f61fcb98si1131980pga.629.2023.11.16.21.44.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Nov 2023 21:44:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=M54trlkb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 1252A8260E42; Thu, 16 Nov 2023 21:43:58 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229998AbjKQFnq (ORCPT + 99 others); Fri, 17 Nov 2023 00:43:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43276 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229436AbjKQFnp (ORCPT ); Fri, 17 Nov 2023 00:43:45 -0500 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B89919D for ; Thu, 16 Nov 2023 21:43:42 -0800 (PST) Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3AH5cX6G022114; Fri, 17 Nov 2023 05:43:27 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=qcppdkim1; bh=EwGl2Raou1wlZbgyA4gj3IIYc9SXGYbAdpUH+BDajbQ=; b=M54trlkb2i4UophFTxb6BvH1lUcpVdKRhLWFyJLbsqKmYjiWfZdoqKJPmjinEj//GzIq tjEQzWeeYzjPFoTeWmcvutLWRNwEF7l2iuA4zeSBpIF/78ZGLS6GavSkUXw6nykIKpMm U070KuSIDEfiMbGp3Bu5T/t+r20bQPRdUKmm9JFGNuzeIk5Su4esE06Rutyc5k0oin2o YTXgsPo6pTna7iVyq/ECQnMYKLfuXvVG7KmnEgO53vpVVyYOwXEh6XDCJH7/KydyMcNO 0uJgejLlDiXogxQUodzRfK3QBPMMhAXgx65xr3LsOivnqB9GcNxKY7tayQ2Lf7AcmQCE Gw== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3udmw41tc8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 17 Nov 2023 05:43:27 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 3AH5hQrR006839 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 17 Nov 2023 05:43:26 GMT Received: from [10.214.66.119] (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.39; Thu, 16 Nov 2023 21:43:23 -0800 Message-ID: <45fc0324-4a1d-7b2c-6cbe-3755056d5981@quicinc.com> Date: Fri, 17 Nov 2023 11:13:20 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH V3 3/3] mm: page_alloc: drain pcp lists before oom kill Content-Language: en-US To: Michal Hocko CC: , , , , , , , References: <5c7f25f9-f86b-8e15-8603-e212b9911cac@quicinc.com> <342a8854-eef5-f68a-15e5-275de70e3f01@quicinc.com> From: Charan Teja Kalla In-Reply-To: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: zyDbRmouoK97QZQYJmqa0ZJBhzr0aezq X-Proofpoint-ORIG-GUID: zyDbRmouoK97QZQYJmqa0ZJBhzr0aezq X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-17_03,2023-11-16_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 mlxlogscore=661 clxscore=1015 suspectscore=0 mlxscore=0 malwarescore=0 bulkscore=0 priorityscore=1501 adultscore=0 lowpriorityscore=0 impostorscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311170039 X-Spam-Status: No, score=-3.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Thu, 16 Nov 2023 21:43:58 -0800 (PST) Thanks Michal!! On 11/16/2023 6:25 PM, Michal Hocko wrote: >> May be other way to look at that patch is comment is really not being >> reflected in the code. It says, " Limit the number reserved to 1 >> pageblock or roughly 1% of a zone.", but the current code is making it 2 >> pageblocks. So, for 4M block size, it is > 1%. >> >> A second patch, that I will post, like not reserving the high atomic >> page blocks on small systems -- But how to define the meaning of small >> systems is not sure. Instead will let the system administrators chose >> this through either: >> a) command line param, high_atomic_reserves=off, on by default -- >> Another knob, so admins may really not like this? >> b) CONFIG_HIGH_ATOMIC_RESERVES, which if not defined, will not reserve. > Please don't! I do not see any admin wanting to care about this at all. > It just takes a lot of understanding of internal MM stuff to make an > educated guess. This should really be auto-tuned. And as responded in > other reply my take would be to reserve a page block on if it doesn't > consume more than 1% of memory to preserve the existing behavior yet not > overconsume on small systems. This idea of auto tune, by reserving a pageblock only if it doesn't consume more than 1% of memory, seems cleaner to me. For a page block size of 4MB, this will turnout to be upto 400MB of RAM. If it is fine, I can post a patch with suggested-by: you. >