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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E6DFBC001E0 for ; Thu, 27 Jul 2023 08:42:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234082AbjG0ImC (ORCPT ); Thu, 27 Jul 2023 04:42:02 -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> 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