Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp32058785rwd; Fri, 7 Jul 2023 08:08:40 -0700 (PDT) X-Google-Smtp-Source: APBJJlHm/Ke2uu+m7Inst5DhgpqMKuVhgi/NgN95szOMI+xrDIzRVe4bMHhc/YfMt8RdePXIWfww X-Received: by 2002:a17:902:a9c1:b0:1b8:a720:f513 with SMTP id b1-20020a170902a9c100b001b8a720f513mr4074764plr.30.1688742520194; Fri, 07 Jul 2023 08:08:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688742520; cv=none; d=google.com; s=arc-20160816; b=Ioq491O7L0y66HbQDx6SjxYn/U19gtk78+syUOcaw/A5QHdqfL1JaboZxqPA48NgpL uYoDHhj+N1AHFOoG2S+Tg+eevjHp6VNPgVtIQwCC2Lbosxr/YRn0rEUKglUHiQaqJkXa X8+ygc95f6Dv2w0CiF/WxiV+Yj9N1s30PebndnufN2NKuJEvFPYREngqiIag9O4YCYqu CORtxrtYdPdN3rhPBDaAK/+OSu/+xEjXnKH3rvaC+ILqjdzPiRlH/3PiJMRcYYWbouSZ aD+1YlJKgSk7KuMf7+aIuMURXy8OPgQufaut74k2oh+DauJej5bwyXRIpa9E1JuXV5J0 lSzg== 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=ZVMmLaENPaM0JjXRiuX3xuMS8784Ru8KYNLD4w1UHB4=; fh=IvUCxt2qnsflPVdWp/hKHCUy+4hzCZL5pdqmkKnfcFw=; b=YhiiU6ac5rxeW6CDGzjpe2fdksnZgSqUhSAjA5JhqhfOiUZSFrBpIiDRMqSdVfo52Y VjG+eNXPZh0CLeFnx3FH9sg6i5fAZj2aHirU5V+nJL9mfojpKD4StjivC7EeNkCvKvuo x8Oi3cESagsnISSFEjSBAEQ4fdh1PK3n/VBhci/qs7+hJDhx7cJGDBotI/5f+lf/GV0j 4vg32MI+yKoH7DE3PlPUw4V6RUXDZ/oJcLDBSfplD0m9UGGT6MwFKDDhY37ofPrQ/a5a FMpcxzMOeOVI1cDgHQqnG7dCygneyuG5Gs/quCcYZeleq4B5RgtltKzawxd0eNiz+CpV VqsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=gY16RP7U; 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 u1-20020a170902e5c100b001b03bacdc9dsi4240583plf.343.2023.07.07.08.08.28; Fri, 07 Jul 2023 08:08:40 -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=gY16RP7U; 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 S232285AbjGGOoj (ORCPT + 99 others); Fri, 7 Jul 2023 10:44:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34554 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229755AbjGGOoi (ORCPT ); Fri, 7 Jul 2023 10:44:38 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7A85C1FD7 for ; Fri, 7 Jul 2023 07:44:34 -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-out1.suse.de (Postfix) with ESMTPS id 31B5221E84; Fri, 7 Jul 2023 14:44:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1688741073; 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=ZVMmLaENPaM0JjXRiuX3xuMS8784Ru8KYNLD4w1UHB4=; b=gY16RP7UTDxhFJM2hnrjCGu6gLgj1ACcLbJSPiViO60JctutlSt7kRGD6KBsq9dt4yCgTX 7Bjq2+UxfpV0ghSg/FJHi/C5r5ezI9TzDz3CcxXimErfiEl1gNhX9lpFEcozGWkxexZ8Wa eZ/jBuMEYFz7xH24+i+Pq8BGdrpViZY= 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 10997139E0; Fri, 7 Jul 2023 14:44:33 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id K9bHAdEkqGTRfQAAMHmgww (envelope-from ); Fri, 07 Jul 2023 14:44:33 +0000 Date: Fri, 7 Jul 2023 16:44:32 +0200 From: Michal Hocko To: =?utf-8?B?6LS65Lit5Z2k?= Cc: minchan@kernel.org, senozhatsky@chromium.org, david@redhat.com, yosryahmed@google.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [External] Re: [RFC PATCH 0/2] zram: objects charge to mem_cgroup Message-ID: References: <20230707044613.1169103-1-hezhongkun.hzk@bytedance.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_NONE, T_SCC_BODY_TEXT_LINE,T_SPF_HELO_TEMPERROR,URIBL_BLOCKED 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 Fri 07-07-23 22:25:48, 贺中坤 wrote: > > Please state the objective you are trying to achieve by this patchset. > > It is always good to summarize the previous discussion and mention what > > is done differently or how previous review feedback has been addressed > > but the overall idea/purpose should be always explicit. > > > > Please elaborate more about both. > > > > Thanks for your reply. > objective: > the compressed memory of zram charge to the cgroup of the user. Why do we want/need that? > summarize the previous discussion: > [1] As I can see, Michal's concern is that the charges are going to fail > and swapout would fail. > > The indirect use of zram is in the context of PF_MEMALLOC, so > the charge must be successful. No, this was not my concern. Please read through that more carefully. My concern was that the hard limit reclaim would fail. PF_MEMALLOC will not help in that case as this is not a global reclaim path. Also let's assume you allow swapout charges to succeed similar to PF_MEMALLOC. That would mean breaching the limit in an unbounded way, no? -- Michal Hocko SUSE Labs