Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1059567rwb; Thu, 8 Dec 2022 06:20:47 -0800 (PST) X-Google-Smtp-Source: AA0mqf6OU+i3QMjuej6gyflnntsGGYZlz1TnJPqnces/KNizmfRD0LIdLZNzh/gTgPdlTKxRqmTU X-Received: by 2002:a17:902:9a47:b0:189:acf9:87af with SMTP id x7-20020a1709029a4700b00189acf987afmr36527087plv.160.1670509247645; Thu, 08 Dec 2022 06:20:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670509247; cv=none; d=google.com; s=arc-20160816; b=JYJ71BZrImSmW5HY1sLHFNdOkUdYoayt4RANDoyVBSs64nTWJ11hN329l2Ux7OAPVc 39N3+K1idWxHq61kPABTqevqZX/QpE7/fUPGRVQTDgzFfeSr3Le5o+5dex4+9/P50/BK haX+9mbDT6LUpv/clT2CEVl+h0u7iWlSasOJdahTTmryVgZ0xAQA7uLbw/6Tnyqc765s sKnNTx1usxOOWIq1K/9V9iSiUP9SJZ0V2j8FO6CONO4mTSmOyQo87m0jdYTGqvfPrRQ9 W5Ip29CHWL6y45YPZZTO+Tb5p/rBvCLEqro0GghixVsFvQ6BhQH0Ki3BVa1kzVyA10R9 i3eA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-id:content-language:accept-language:in-reply-to:message-id :date:thread-index:thread-topic:subject:cc:to:from; bh=BxDVabd2vGjTDsqgiPTdt2RefTtYZ+thCFZD7OSLRG8=; b=MixrB5EsQ2+srqr7/vvWxF9SD5tkjwp+qrAL0zTPFCakSi+zmA8gbfhh2zIvXPapoZ uXEU3plfyFbOniyyFQI4CsiShvKuQd5vZQr2HCqXxWXuQGL6mJ5667m360F5pevDbVLd tnrdDq7eTPab/soAlOAboeLa201Xs5wpuPaAEKDIxg0otOyj6sTlmzmaRvXLJTERZ58l /4NBy0VNE5VE5tpZ0lpt/Txfj6T1N4FbqNOIm9/4jm42syelPYfST+YBjskVDcidDb8M pk4g8mW9zodxn3pO+kXf6cjNbghxg1zxK6CfZHu32jrnkfp4AtmnnSzcYoQ56sN97eDE IoKw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 11-20020a63060b000000b0044e12bf26ecsi23549041pgg.465.2022.12.08.06.20.37; Thu, 08 Dec 2022 06:20:47 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229500AbiLHOHR (ORCPT + 73 others); Thu, 8 Dec 2022 09:07:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42238 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229521AbiLHOHO (ORCPT ); Thu, 8 Dec 2022 09:07:14 -0500 Received: from mx6.didiglobal.com (mx6.didiglobal.com [111.202.70.123]) by lindbergh.monkeyblade.net (Postfix) with SMTP id BEF2417A81; Thu, 8 Dec 2022 06:07:11 -0800 (PST) Received: from mail.didiglobal.com (unknown [10.79.65.18]) by mx6.didiglobal.com (Maildata Gateway V2.8) with ESMTPS id 0F88711053B802; Thu, 8 Dec 2022 22:07:06 +0800 (CST) Received: from ZJY03-ACTMBX-05.didichuxing.com (10.79.71.35) by ZJY02-ACTMBX-06.didichuxing.com (10.79.65.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.17; Thu, 8 Dec 2022 22:07:06 +0800 Received: from ZJY03-ACTMBX-05.didichuxing.com ([fe80::1dcd:f7bf:746e:c769]) by ZJY03-ACTMBX-05.didichuxing.com ([fe80::1dcd:f7bf:746e:c769%8]) with mapi id 15.01.2375.017; Thu, 8 Dec 2022 22:07:06 +0800 X-MD-Sfrom: chengkaitao@didiglobal.com X-MD-SrcIP: 10.79.65.18 From: =?utf-8?B?56iL5Z6y5rabIENoZW5na2FpdGFvIENoZW5n?= To: Michal Hocko CC: chengkaitao , "tj@kernel.org" , "lizefan.x@bytedance.com" , "hannes@cmpxchg.org" , "corbet@lwn.net" , "roman.gushchin@linux.dev" , "shakeelb@google.com" , "akpm@linux-foundation.org" , "songmuchun@bytedance.com" , "viro@zeniv.linux.org.uk" , "zhengqi.arch@bytedance.com" , "ebiederm@xmission.com" , "Liam.Howlett@oracle.com" , "chengzhihao1@huawei.com" , "haolee.swjtu@gmail.com" , "yuzhao@google.com" , "willy@infradead.org" , "vasily.averin@linux.dev" , "vbabka@suse.cz" , "surenb@google.com" , "sfr@canb.auug.org.au" , "mcgrof@kernel.org" , "sujiaxun@uniontech.com" , "feng.tang@intel.com" , "cgroups@vger.kernel.org" , "linux-doc@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-fsdevel@vger.kernel.org" , "linux-mm@kvack.org" Subject: Re: [PATCH v2] mm: memcontrol: protect the memory in cgroup from being oom killed Thread-Topic: [PATCH v2] mm: memcontrol: protect the memory in cgroup from being oom killed Thread-Index: AQHZCrfAdhr5zYTMtke9YS08C4BFfq5jExWAgACNdAD//34EAIAA6LeA Date: Thu, 8 Dec 2022 14:07:06 +0000 Message-ID: <3E260DAC-2E2F-48B7-98BB-036EF0A423DC@didiglobal.com> In-Reply-To: Accept-Language: zh-CN, en-US Content-Language: zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.79.65.102] Content-Type: text/plain; charset="utf-8" Content-ID: <4E155EE2AF03EF418EE4F2728C2F93A6@didichuxing.com> Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS 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 QXQgMjAyMi0xMi0wOCAxNjoxNDoxMCwgIk1pY2hhbCBIb2NrbyIgPG1ob2Nrb0BzdXNlLmNvbT4g d3JvdGU6DQo+T24gVGh1IDA4LTEyLTIyIDA3OjU5OjI3LCDnqIvlnrLmtpsgQ2hlbmdrYWl0YW8g Q2hlbmcgd3JvdGU6DQo+PiBBdCAyMDIyLTEyLTA4IDE1OjMzOjA3LCAiTWljaGFsIEhvY2tvIiA8 bWhvY2tvQHN1c2UuY29tPiB3cm90ZToNCj4+ID5PbiBUaHUgMDgtMTItMjIgMTE6NDY6NDQsIGNo ZW5na2FpdGFvIHdyb3RlOg0KPj4gPj4gRnJvbTogY2hlbmdrYWl0YW8gPHBpbGdyaW10YW9AZ21h aWwuY29tPg0KPj4gPj4gDQo+PiA+PiBXZSBjcmVhdGVkIGEgbmV3IGludGVyZmFjZSA8bWVtb3J5 Lm9vbS5wcm90ZWN0PiBmb3IgbWVtb3J5LCBJZiB0aGVyZSBpcw0KPj4gPj4gdGhlIE9PTSBraWxs ZXIgdW5kZXIgcGFyZW50IG1lbW9yeSBjZ3JvdXAsIGFuZCB0aGUgbWVtb3J5IHVzYWdlIG9mIGEN Cj4+ID4+IGNoaWxkIGNncm91cCBpcyB3aXRoaW4gaXRzIGVmZmVjdGl2ZSBvb20ucHJvdGVjdCBi b3VuZGFyeSwgdGhlIGNncm91cCdzDQo+PiA+PiB0YXNrcyB3b24ndCBiZSBPT00ga2lsbGVkIHVu bGVzcyB0aGVyZSBpcyBubyB1bnByb3RlY3RlZCB0YXNrcyBpbiB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