Received: by 2002:a05:6358:f14:b0:e5:3b68:ec04 with SMTP id b20csp2419761rwj; Mon, 19 Dec 2022 04:27:50 -0800 (PST) X-Google-Smtp-Source: AMrXdXvMKdGhloKOql+NmLkvbiWhcXzb2J5anH5rspPuQDvpPb21BQRwP6E2CxLadqrDX+ODiWpN X-Received: by 2002:a17:907:a641:b0:819:2756:e090 with SMTP id vu1-20020a170907a64100b008192756e090mr4141367ejc.50.1671452869845; Mon, 19 Dec 2022 04:27:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671452869; cv=none; d=google.com; s=arc-20160816; b=jMRYIXfsGfGux6X4JUhtdemfKjQVf5GCs+Ft8pN7eVXzMHoqYueSJPjMa8DcwwvVUb +7TtIoazTb8GywiGGbapCvD9JFJT4C7SBM2Mf9sfT02KRzCvFtS6/xOmlNfLQXXm0ioE 235mc4FBZSq3RaQES6mNrBVZThvZD5ak6YFIRYoNdzMALm3O/+fWXcfGh3E6gGYx8CSZ qrn4Z0sQDKBkTKpkp/b3BTvmcKr4hhPCMI8RW201lNLr+8ZkgMcMnZ2dJjc7cyxgRIIu +68pOWbxgLJ1ajTMBAazbVX5uNvyaEdhNtPujJ3zGMMfCqGwEzVF9zjUPRHQPwv0xyaM XtBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=vcYyeovvyeIUt7S0vbCFAC7dHaOjTv+mzzbe5d276WA=; b=ncmiUMi4S/gahGl2Hr9h8HnAIVN+GCzIw+4Y1dRTkmnvymcDtpMJT/b31qsxmJ34on D+vuIgeNX/hI0PPZVdbKDcphgcSgFqeHgcFSQER473jFlmupMSnvQ8s7S3EZHZD5vEHl q4HpVBqICp1XhiGwmbkY3kUx4z4IkNEZ4knklEkGeDXe0I5/iL7DLuaFijHhtENe1q3p 6IByTdR0m0l6oFxQFsWfyMtryYpzlgXo7ljG6//JWTZx5R/UDOkvTKjtnKIkta21d5D9 pqAOXyOZXaXrnpzdODhSXYPSTDzkbzTdmDwUNpltKp3L7xypOSXDR4tM+643sSRL/M+f s9ew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=cKH6lPcm; 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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h9-20020a0564020e8900b0046ca3d56ff5si7567783eda.571.2022.12.19.04.27.32; Mon, 19 Dec 2022 04:27:49 -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; dkim=pass header.i=@suse.com header.s=susede1 header.b=cKH6lPcm; 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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231686AbiLSMH1 (ORCPT + 70 others); Mon, 19 Dec 2022 07:07:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52036 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231516AbiLSMG4 (ORCPT ); Mon, 19 Dec 2022 07:06:56 -0500 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2E14D1106; Mon, 19 Dec 2022 04:06:53 -0800 (PST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 753FD607DC; Mon, 19 Dec 2022 12:06:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1671451611; h=from:from:reply-to: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; bh=vcYyeovvyeIUt7S0vbCFAC7dHaOjTv+mzzbe5d276WA=; b=cKH6lPcm6qTERFkgfs95izoDW3LTVijdvzrmfJn690l+1owObw0m+Kz7Y06qsjOaD6EqbN 1nQu1wgzRFe45utSi3lZdgUiSHYfJhsXYSCl4AiM7stbZoFRgU5YJjZf7vof2Pl0jVnVap 3Cb7KuvdLUWZo1lmVQy5c4TDx9dQfMk= Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 6005B13910; Mon, 19 Dec 2022 12:06:51 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id ScRpF9tToGMUbwAAMHmgww (envelope-from ); Mon, 19 Dec 2022 12:06:51 +0000 Date: Mon, 19 Dec 2022 13:06:51 +0100 From: Michal Hocko To: =?utf-8?B?56iL5Z6y5rab?= Chengkaitao Cheng 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 Message-ID: References: <395B1998-38A9-4A68-96F8-6EDF44686231@didiglobal.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,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 On Mon 19-12-22 03:16:33, 程垲涛 Chengkaitao Cheng wrote: > Hi Michal Hocko, > Looking forward to your reply. I am sorry, I do not have anything to add to my previous concerns. But let me summarize. I think your way of mixing per memcg protection with the per-process oom_score is very dubious. This is not an unfixable problem. All you need to do is the discount all processes in the same memcg equally. A bigger problem is, though, that I am not convinced the memory protection based interface is really viable. Based on experiences with the existing reclaim protection interface this is not really trivial interface to use. You either have to have a good overview of the working set size or you have to auto-tune it based on a feedback mechanism (e.g. PSI). Auto-tuning based on oom which should be a rare event is rather problematic I would say. All that being said I am not convinced that the interface is practically usable and you haven't really provided good examples to prove me wrong. -- Michal Hocko SUSE Labs