Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp2113767rwb; Thu, 27 Jul 2023 02:09:50 -0700 (PDT) X-Google-Smtp-Source: APBJJlHlp+FtfE3DGBcZhGXqqevp3nAabO9i7adSnRSKVtsiog83CzZe7r71i3c+qZTy46c3AAkS X-Received: by 2002:a17:90b:14b:b0:25b:d292:d9a3 with SMTP id em11-20020a17090b014b00b0025bd292d9a3mr4049937pjb.37.1690448990581; Thu, 27 Jul 2023 02:09:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690448990; cv=none; d=google.com; s=arc-20160816; b=fwJasLoDQCshMWB4TsfI9cF/t8dknL1BgfhRB/2WRW22wNaOrkqsrpahJ3xN0NTiQ6 r7RpEfJfe3gZVzkdn+YoNcmcOXhIZbsGaGwTX8CDUcJsgRmS8A7l7wfAcmofA7NCfM7h 2sFQi9z1uRUlKAG/LgZEODCGOgZz2uMdTlKAcgCrhkzdYQ3790fcByjCs963M8yetC9q ZR3dRVbnfLX9Mfi6bgDYDq7uWMGuUdwsWUSYKbNyFN8swcbXW2F3A6pIgQyu7b9afSmc fIZUpA9DTW/QDieOx5WbKMYkUCaiWHhL6d4lZR7fuDMqIxxyBiQB4wyhUx12KMRfzRMa bHYQ== 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-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=gY74IzTCesS0wb70fi0IwI5ytjeH3ogluPp5I4+w60Q=; fh=gbjt5B7NRZsfzo6f2Pf0upoSLGj6eWPI9+XqS9rMZc4=; b=an5BuFid8DM9fHMZBdIEdLs/MBpa4RYJWtnwTUTblYJd/mk5AYKH6miydFMuBpLUjj l2H2AnVutGqhmXgGJwHiNQYX9egQtDVf/SbkDwW+Mekx65N34DU1zWhmrcslgbsJ7wXk tyO53TbTXTlIfrFMlIccgEkKNTHOyumj7jADxUaMCAMyKbdVS8PYKHQGgS43WMnTakMt Z6Q18gXQqaniKF+nDqnT1zHLHrcPOkJ4lmodDLjmX3XtZ37BhAg3qNLzFb1Gx6dc1d8g Pd0qEOGFYbJLffCgVyG05B2mJrchCG1pUhIHhAEO5heEWEu1ZyiIPZ6aXaZh/OPrtdka 42vQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=gTGvQ7d1; 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 rj14-20020a17090b3e8e00b002683c7b2e03si2663467pjb.157.2023.07.27.02.09.38; Thu, 27 Jul 2023 02:09:50 -0700 (PDT) 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=gTGvQ7d1; 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 S234365AbjG0ImB (ORCPT + 99 others); Thu, 27 Jul 2023 04:42:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51182 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233992AbjG0Il0 (ORCPT ); Thu, 27 Jul 2023 04:41:26 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C2E32C9AD; Thu, 27 Jul 2023 01:24:39 -0700 (PDT) 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 D7A1E1F86A; Thu, 27 Jul 2023 08:15:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1690445716; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=gY74IzTCesS0wb70fi0IwI5ytjeH3ogluPp5I4+w60Q=; b=gTGvQ7d1fdL8EgiK/BHVi3m/TYh7xgr12LDZ1sG9jUAP60Pm9p5h+HYwKoTWTAB3Bi0d6z vNxtR8/PqsL6NyWzguauQv5uH9tj/RycaO+d2zM+UpsHi453Z7SinHnPu5G46CP/FMKmzV oYQbbi+v8LrG0sCY0gkMtmmzafaNStM= 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 BB04613902; Thu, 27 Jul 2023 08:15:16 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id HiiPKpQnwmQsSQAAMHmgww (envelope-from ); Thu, 27 Jul 2023 08:15:16 +0000 Date: Thu, 27 Jul 2023 10:15:16 +0200 From: Michal Hocko To: Chuyi Zhou Cc: hannes@cmpxchg.org, roman.gushchin@linux.dev, ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org, bpf@vger.kernel.org, linux-kernel@vger.kernel.org, wuyun.abel@bytedance.com, robin.lu@bytedance.com Subject: Re: [RFC PATCH 0/5] mm: Select victim memcg using BPF_OOM_POLICY Message-ID: References: <20230727073632.44983-1-zhouchuyi@bytedance.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230727073632.44983-1-zhouchuyi@bytedance.com> 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,T_SCC_BODY_TEXT_LINE 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 Thu 27-07-23 15:36:27, Chuyi Zhou wrote: > This patchset tries to add a new bpf prog type and use it to select > a victim memcg when global OOM is invoked. The mainly motivation is > the need to customizable OOM victim selection functionality so that > we can protect more important app from OOM killer. This is rather modest to give an idea how the whole thing is supposed to work. I have looked through patches very quickly but there is no overall design described anywhere either. Please could you give us a high level design description and reasoning why certain decisions have been made? e.g. why is this limited to the global oom sitation, why is the BPF program forced to operate on memcgs as entities etc... Also it would be very helpful to call out limitations of the BPF program, if there are any. Thanks! -- Michal Hocko SUSE Labs