From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michal Hocko Subject: Re: [RFC] Add swappiness argument to memory.reclaim Date: Thu, 19 May 2022 10:51:53 +0200 Message-ID: References: Mime-Version: 1.0 Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1652950315; 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=FCjPr++xl8KWyokuomIbrLcBjRsIcgmfUkDoWFF5TfQ=; b=bdEsvTECKnnG+/TGmv9Jm6Uix+LiSfB64gpLouR5lZEGtMlNKGmBc+PQ+c0zUdzWgdnJei LV6TEuLx2lhInScjYrlGK5Z60rG2ozef/uM1tvsbAXvmYoHTY3VJjc0edx9JUzLjC9tQji dk3ppAYpQPph5pconNU2KexH9Q4yNys= Content-Disposition: inline In-Reply-To: List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Wei Xu Cc: Johannes Weiner , Yosry Ahmed , Shakeel Butt , Andrew Morton , David Rientjes , Roman Gushchin , Cgroups , Tejun Heo , Linux-MM , Yu Zhao , Greg Thelen , Chen Wandun On Wed 18-05-22 22:44:13, Wei Xu wrote: > On Tue, May 17, 2022 at 1:06 PM Johannes Weiner wrote: [...] > > But I don't think an anon/file bias will capture this coefficient? > > It essentially provides the userspace proactive reclaimer an ability > to define its own reclaim policy by adding an argument to specify > which type of pages to reclaim via memory.reclaim. I am not sure the swappiness is really a proper interface for that. Historically this tunable has changed behavior several times and the reclaim algorithm is free to ignore it completely in many cases. If you want to build a userspace reclaim policy, then it really has to have a predictable and stable behavior. That would mean that the semantic would have to be much stronger than the global vm_swappiness. -- Michal Hocko SUSE Labs