From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id D8A92C4332F for ; Tue, 14 Nov 2023 16:37:19 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 28AA96B02F4; Tue, 14 Nov 2023 11:37:19 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 23AA86B02F5; Tue, 14 Nov 2023 11:37:19 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0DD546B02F6; Tue, 14 Nov 2023 11:37:19 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id EBB176B02F4 for ; Tue, 14 Nov 2023 11:37:18 -0500 (EST) Received: from smtpin27.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id BBB7112027B for ; Tue, 14 Nov 2023 16:37:18 +0000 (UTC) X-FDA: 81457114956.27.B359AD7 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by imf01.hostedemail.com (Postfix) with ESMTP id 4A63F40018 for ; Tue, 14 Nov 2023 16:37:16 +0000 (UTC) Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=quicinc.com header.s=qcppdkim1 header.b=NFay2uXC; spf=pass (imf01.hostedemail.com: domain of quic_charante@quicinc.com designates 205.220.180.131 as permitted sender) smtp.mailfrom=quic_charante@quicinc.com; dmarc=pass (policy=none) header.from=quicinc.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699979836; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=d6d5JnrLOKkFEuf60AdLIKgO17UAPgEEpTlWOXKblBg=; b=s5rdzbeeJ0hTkUXWYW9hbL3lQjrJL8w3lr/bxPruhM/KDzXMZnYrXMBbx+vH46TLSk7mnS tsVBbYxB5EtdO2Wraq/wjvm4eOts7E54btWRm7HD/a9eKzdB1vjlxAnYdutZ+2uNNJPZJ2 wn2oKQ69cz35lIgYuLGyaScWeVeA0o8= ARC-Authentication-Results: i=1; imf01.hostedemail.com; dkim=pass header.d=quicinc.com header.s=qcppdkim1 header.b=NFay2uXC; spf=pass (imf01.hostedemail.com: domain of quic_charante@quicinc.com designates 205.220.180.131 as permitted sender) smtp.mailfrom=quic_charante@quicinc.com; dmarc=pass (policy=none) header.from=quicinc.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1699979836; a=rsa-sha256; cv=none; b=CKiFHv7KzfP43QhTr0+x7tcha4+DTM2cAK6XRicOhzoELd2536NKJZof9itbSNyf5OBpY2 CXU0/WLNfkKfLUBglnMDXJfPZWXI0nNK8Col9EEhK7r1azjTnpsIFmY6RprllEa9qjFmGX 92nA3FIacvoQx5R38UdwlA9db29Jf4s= Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3AEBnQ5u023142; Tue, 14 Nov 2023 16:37:14 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=d6d5JnrLOKkFEuf60AdLIKgO17UAPgEEpTlWOXKblBg=; b=NFay2uXCvt68y4IzADt2uVsaIymByaz75bRV+PKWQyIWBTpEUX6X6JV729DKFKDiULJu IXGsR6MJs9t1I6JbsUU2n4ynZwCdtgYePAkEW7o8AoZRiGaduKw2mAL4i7Qs0Rtfspj2 gHYV1/lmnv8QSV4pQXWr6MGASXz1GleHlxozPpS7NYlZYtqPDrazskMZdPymj4DlFnP3 bLvEs4lmmfS8mRB5hdYIf+BiOFbwJJ4uJDO46WKqKDbrXIEKGGcPwo9yVIRdz/hY4ryB I/GJCo5nTjP03WiUmaOM4wvw7/SWG98gSeCGpH6CTCqlxuwN/A9l/QycD6+Dd8X1XKq7 NQ== Received: from nalasppmta02.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3ubge83e97-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 14 Nov 2023 16:37:14 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA02.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 3AEGapVi020575 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 14 Nov 2023 16:36:51 GMT Received: from [10.216.14.234] (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; Tue, 14 Nov 2023 08:36:48 -0800 Message-ID: <342a8854-eef5-f68a-15e5-275de70e3f01@quicinc.com> Date: Tue, 14 Nov 2023 22:06:45 +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 To: Michal Hocko CC: , , , , , , , References: <5c7f25f9-f86b-8e15-8603-e212b9911cac@quicinc.com> Content-Language: en-US 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-ORIG-GUID: xVsz0shT-lRtTgj7AzInukagZ6kFVODX X-Proofpoint-GUID: xVsz0shT-lRtTgj7AzInukagZ6kFVODX 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-14_16,2023-11-14_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 spamscore=0 malwarescore=0 adultscore=0 priorityscore=1501 mlxscore=0 phishscore=0 lowpriorityscore=0 impostorscore=0 clxscore=1015 mlxlogscore=447 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311140127 X-Rspamd-Queue-Id: 4A63F40018 X-Rspam-User: X-Stat-Signature: q4srgagjb5bmhybetomqpohin1eki6e7 X-Rspamd-Server: rspam01 X-HE-Tag: 1699979836-573965 X-HE-Meta: U2FsdGVkX19KOxEb98EmnaJkxXE7Qn5/PJ98H8k3Fr5aThmDzERdvNdVni2fpZV3ThxxQdV4brRQSr/m/IchBiu3LTDz+gzjGqCa4/hjLowKjQfQaKwM5eipwzgT0neSjAzT5vblzH+FsCxobnHAgvc74u/ph+KMYQEkZEhbKV+ARfkTs3nyrIVCpDe25esTexsjxKzDYdxR0tDbp72Wj/Zj68g5KUjF/y8cxxSFRmPK/W8pMgdOIMJ6Pvd4FNv/tVG+By7rvw7aI2TvV41TuqAHL89Gtgj/vHc5sNmv89jWHTry3INIk8AQTDKXGbQ1DTgdwUxUyB+qs6K0cGqNR9RyPJR6me8EWp6VtGRtvkoBvDulV3FSOzMJpdrAct6PI/2kKfsa32GqvMveS6zWdGrwHzhrGiwNDoS68Ib0TkVi7xZAFuBD0F9ehGWboQ5IvPC6pPOTF159g8wHBqQ5NVnUJNUuCKCYUMcZG1G3JVBbijGWs3YGfklCDlu2M0JICivdiRL1H28sYc+oye60mDrz8n/5pBpiOnejpqrMuecEsGlkCjat/NSBnMgM+ocnkTtYcV94LbqiTF6tYJNHNqWkID9EuIqRsmwpa58SHK7al7852I00XFzIuteJ5bDFVf45cMzhu4v7XazEhsgAJjYXQXR5oz5IkKKTP8dCrhEU+NCOf0DBZUrfSU7sktRk8Sqp9PTqr6IW3WXSc53BIEts1VS7aoopvpmktmElsw4QGx8ywoKoObBmlIGRc8TIC1A9JsSNvunq8i9LnwKrimFl/L+JFKQOvsuhN9sKf/vO2ZHXl70WwDeuaAxo/DaX6dotQmuHXhKwxSfejBzJ5/zjNQD6F9ne8iEV7m7kDpVsTl/H7aA0BIurKrdTyv/QU39adE0MhPyfol/6Iw0yJlbaK9qDzbMEQFdrHGLJhnQyNmkwq87OB9ab6Jkd/CvWBD6/AbpI4YM/oqaF9zU /OdqiOrQ 0yIuoi5L2H5o2YA2q92gwb4ZHrVOjorKTtPFyCPw2Ny7fbEU9ea3auciu9Mu5ZVbTTl6UDg8D+2ENxUNO184cv+QXM+5z8SbYMKeAVx3VZbxiMYIAUTQa4D/7Pmv1zM9oFPaHASj0jCXqpQUh4Fce8g6yOsSno0OZHNZKfx40lxTPcpndubHM6aIxIDIqGfrcO+Cb86xLzUFQ4r6qH8Ttz3tjO4XShOVeRSGXre58pvHwikLIeE6fkp8NbhP/YiLmwWLN X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Thanks Michal!! On 11/14/2023 4:18 PM, Michal Hocko wrote: >> At least in my particular stress test case it just delayed the OOM as i >> can see that at the time of OOM kill, there are no free pcp pages. My >> understanding of the OOM is that it should be the last resort and only >> after doing the enough reclaim retries. CMIW here. > Yes it is a last resort but it is a heuristic as well. So the real > questoin is whether this makes any practical difference outside of > artificial workloads. I do not see anything particularly worrying to > drain the pcp cache but it should be noted that this won't be 100% > either as racing freeing of memory will end up on pcp lists first. Okay, I don't have any practical scenario where this helped me in avoiding the OOM. Will comeback If I ever encounter this issue in practical scenario. Also If you have any comments on [PATCH V2 2/3] mm: page_alloc: correct high atomic reserve calculations will help me. Thanks.