From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 995C622B5B8 for ; Thu, 16 Jan 2025 14:36:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737038192; cv=none; b=dmKBrj6qy3bgeN3vznaHC2EcidAmp1slv1n82p7+qrwD3aDvZuYCybhxR1sptH3CUbPRmCBU1tlUUFa3G05IshetSYAbu7CBeNLi4jJT2IXNF09ycL/D5CsHFs1exNL/9LBgsh1hFo+Aj3RMBFOe6v+ZsWZS34hJXdaNhd9WAQE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737038192; c=relaxed/simple; bh=A9D+v7zaqx3z3QaomV4DjhH4UrAminx35uS9A1u32zQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=u5luR2CtAA0jrTLcVR9gs5KTxFy4RDK+jRfgXN+uy4o5RitIk3kU8dBO0J6gStPTV8Y0KurtqFs9CXIccvxcwL/5uYdVHssvJHNkfYdImQ2w492nk9QGx6/K04u7XM0U8qCdFTZZ2HZxwKD06Qo73cEB/3iNHD06fte75NKzv7E= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=FedfdL4T; arc=none smtp.client-ip=209.85.221.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="FedfdL4T" Received: by mail-wr1-f42.google.com with SMTP id ffacd0b85a97d-38634c35129so847999f8f.3 for ; Thu, 16 Jan 2025 06:36:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1737038189; x=1737642989; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=+FP56eEdwVt+04AI4F5C4W80KfN2yE/si4ZKrhL9SWM=; b=FedfdL4TqGcKoRCZOkUQwNsQpzzqpDJuqzuKG18+G29tr1Fzar4o1FDsbO/Y5CtjJl djaO4d1z3HzrvAuDoo5K1Svy5qN5l0VxUy4HucDtRAZluXhPjYCHe7h6gBou/ZWo5gsd YgbYNBiCXHB2N2cyraetjK/w99157Wacin+f6BULFqXzk3JU1elIgxtiN8edtPUTbxzF S94vVkwMa5/z5G9rlgDHcnwYY+N5wYJYbnSNFLEKQK/uwtPU/yj3yXTuizeBL8zwrgII ZDKX5QRq8LnaNQr/aDSwhToJnlyXwEOFyCxppGosRKm2azNfTX8Z7nBRCYe+uVY+eTkb Gf6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737038189; x=1737642989; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=+FP56eEdwVt+04AI4F5C4W80KfN2yE/si4ZKrhL9SWM=; b=kzJoFRcvu9FxuKMoseXRnGnIwYgPgTKbYkOD0CEtiz+berpn9MeMqWkeCsBaWGO99s PZYcY6FjqK103stcNJuSNuGGQpdoeqEsjrhokNKtX3RWkfbeW2wLF4oYO+xb5VmYX5zz 2Ca+bmCVpiFnybXzGeQad8gm75Rxqi0oLficjbRINziIQafzfV9Tc5a2QhryNqYOiEv5 GWSj6affFQ4FXbIIF6DrCFTU8sQuG3kJdY41pP38Kv/N2H6tnCq4AWkudxoAVT7FSOCZ BlDhBul+yVUPMo0QfQZgTCKwlvbeIIoNLz2kSPLdBZgu9xyEVo7VKlEiB/0v5MJ/xnHh NZQQ== X-Forwarded-Encrypted: i=1; AJvYcCVQ0NHmRyv14BeeNP9yKXh0iDim7O33Y8jMo0SJqRsJirA0XVkjlD3OmiSfJaU3CQ7UqmZT3oxQ0kS+yik=@vger.kernel.org X-Gm-Message-State: AOJu0YxE2dgj03gwHrGk0s+MaQGIYzNsX02WWTtH2gSeT47Z7EgPtQDY dKlYG9WhXFGNY+HBDcV/jVKFKK7EnZodvQtNd3vcgaoBqmoZ92fnJrp4fFBvkMU= X-Gm-Gg: ASbGncuaRXCOrTXqlUEdSUAVjnQ3vkuU7sZtL4ulYfDHvjYzis+va+zOysThHmUnpTy rR03hl3f1kZTfraloz4tWp5LLa8S9kI/d4eg9AOesdgZO3WEPwmkcSV601iEGuQOFAT6Pd6v7Sf Hx0E4/ubqTL00zW/wJACIDyQjxoHIveHIMmEqRvMFDzdLV+c+QhTl0qRANgUBgNn/qsD5OTQucI W+VGANxsBQoPJmwg4RsEx1TTdpvqG13v5zZC484E1RGdi5kNSElpaV1zexOqB+pmDLQMg== X-Google-Smtp-Source: AGHT+IHfYGs0wqb0pQglOIH1jYOE+QZ/hkb9WYhL0LkqiqdS6TLInIyP7XahS3sABPkFz1l+CaKaDw== X-Received: by 2002:a05:6000:186e:b0:386:3327:9d07 with SMTP id ffacd0b85a97d-38a8733cbc3mr29425462f8f.54.1737038188882; Thu, 16 Jan 2025 06:36:28 -0800 (PST) Received: from localhost (109-81-84-225.rct.o2.cz. [109.81.84.225]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38bf3221baasm38771f8f.35.2025.01.16.06.36.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jan 2025 06:36:28 -0800 (PST) Date: Thu, 16 Jan 2025 15:36:27 +0100 From: Michal Hocko To: Zhiguo Jiang Cc: Johannes Weiner , Roman Gushchin , Shakeel Butt , Muchun Song , Andrew Morton , cgroups@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, opensource.kernel@vivo.com Subject: Re: [PATCH] mm: memcg supports freeing the specified zone's memory Message-ID: References: <20250116142242.615-1-justinjiang@vivo.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250116142242.615-1-justinjiang@vivo.com> On Thu 16-01-25 22:22:42, Zhiguo Jiang wrote: > Currently, the try_to_free_mem_cgroup_pages interface releases the > memory occupied by the memcg, which defaults to all zones in the system. > However, for multi zone systems, such as when there are both movable zone > and normal zone, it is not possible to release memory that is only in > the normal zone. > > This patch is used to implement the try_to_free_mem_cgroup_pages interface > to support for releasing the specified zone's memory occupied by the > memcg in a multi zone systems, in order to optimize the memory usage of > multiple zones. Could you elaborate more on the actual usecase please? Who is going to control which zone to reclaim from, how and why? -- Michal Hocko SUSE Labs