Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp1081574ybi; Wed, 3 Jul 2019 09:11:13 -0700 (PDT) X-Google-Smtp-Source: APXvYqwUOlfnKwmfByyfrsfAmkKD22qnmCzT2HMU8neDA7zq0iTkkZB5FL24ax5K+aQ58UM+p8Tr X-Received: by 2002:a63:1657:: with SMTP id 23mr35602003pgw.98.1562170273119; Wed, 03 Jul 2019 09:11:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562170273; cv=none; d=google.com; s=arc-20160816; b=0RdJFXdR5h1ym8oG8EqkvjeXpoI+MR3lmFUqDOBuGtNj/WtxsFAchwxTy3HtPScHdP nsAh6fkirdQB963kG8sN0dhn29aZ+silVRtWt7sJzXG8CiO9Bj2jS8jV1lxlOBbm+yH+ 9bqzYwsQrAmmmgmoXAXUQmHQ9S4dQCAn2/pSi6knVkQC2Vl/CnNPGhe8LCeZLET1aOSH 3FzZS7UomW/f9YewvuSB8KQzXxWSRhS/nI5/MUD4z5ItyofaDLiohclsv4dhEkVkJv0c MCUuNG0vLcxtSupW8+HCnRhIqcko0gZtHDqGjbdZVLAG2dKKFAGszBaBrUHB4Bl3D/s6 Ezag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:feedback-id:mime-version:user-agent :references:message-id:in-reply-to:subject:cc:to:from:date :dkim-signature; bh=wRhFAPDN9W31/7q1dT/zdEt3Cu7N780+Gi6e7xOeZoI=; b=Qy9SePke3mhvoPPVeENCk6s0QlsxxgBrXdybg1ltH0MTtbRa3YLE6nFfoGffJ0llPP 02gWit2Yl2zzlzBckytBT0gwgjt9P/byyT16DzhufWR8Zd0O+Jj7U0dK2mlFLT2ZbtX8 2SHBLOffMTlApeeTFASvfVfQ1e9CWKetj7KD45kJuc11tKZJkYUXUsO70FB1Rv2Fu5H8 cX1zMija2mPo/k+huMfe8Pne7VSYdmaXnMeFwrx6eEp58cOYDbLDtSB8EiE9oWruDxXW Tb9HM4DntiQgEZ7jvGArvZ/uVCQQ2xVfivfsPXicYyBtv9S0pvT7s1xXuuh9YMSJSyom MRlw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazonses.com header.s=6gbrjpgwjskckoa6a5zn6fwqkn67xbtw header.b=AZ1omCiJ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m99si2356218pjb.107.2019.07.03.09.10.56; Wed, 03 Jul 2019 09:11:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@amazonses.com header.s=6gbrjpgwjskckoa6a5zn6fwqkn67xbtw header.b=AZ1omCiJ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726918AbfGCQKd (ORCPT + 99 others); Wed, 3 Jul 2019 12:10:33 -0400 Received: from a9-54.smtp-out.amazonses.com ([54.240.9.54]:59100 "EHLO a9-54.smtp-out.amazonses.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726473AbfGCQKc (ORCPT ); Wed, 3 Jul 2019 12:10:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=6gbrjpgwjskckoa6a5zn6fwqkn67xbtw; d=amazonses.com; t=1562170231; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:MIME-Version:Content-Type:Feedback-ID; bh=wRhFAPDN9W31/7q1dT/zdEt3Cu7N780+Gi6e7xOeZoI=; b=AZ1omCiJcuo1xOM8hwRxHYsOmsp7QmftZ/s2l9pRNQ0/UpulCa0XIDjkDIJhXeHD pEGlkzc0c6EGKQ3xgeTyAVXNbkiyJdKJTl1et6y1CcBPnwLyUJdn1wOHCPxXaEx/N20 SGvnPPNX4Ry6+ie176GFa9Q7j5m6Rn7y0m3ld11U= Date: Wed, 3 Jul 2019 16:10:31 +0000 From: Christopher Lameter X-X-Sender: cl@nuc-kabylake To: Waiman Long cc: Michal Hocko , Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , Alexander Viro , Jonathan Corbet , Luis Chamberlain , Kees Cook , Johannes Weiner , Vladimir Davydov , linux-mm@kvack.org, linux-doc@vger.kernel.org, linux-fsdevel@vger.kernel.org, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, Roman Gushchin , Shakeel Butt , Andrea Arcangeli Subject: Re: [PATCH] mm, slab: Extend slab/shrink to shrink all the memcg caches In-Reply-To: <9ade5859-b937-c1ac-9881-2289d734441d@redhat.com> Message-ID: <0100016bb89a0a6e-99d54043-4934-420f-9de0-1f71a8f943a3-000000@email.amazonses.com> References: <20190702183730.14461-1-longman@redhat.com> <20190703065628.GK978@dhcp22.suse.cz> <9ade5859-b937-c1ac-9881-2289d734441d@redhat.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-SES-Outgoing: 2019.07.03-54.240.9.54 Feedback-ID: 1.us-east-1.fQZZZ0Xtj2+TD7V5apTT/NrT6QKuPgzCT/IC7XYgDKI=:AmazonSES Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 3 Jul 2019, Waiman Long wrote: > On 7/3/19 2:56 AM, Michal Hocko wrote: > > On Tue 02-07-19 14:37:30, Waiman Long wrote: > >> Currently, a value of '1" is written to /sys/kernel/slab//shrink > >> file to shrink the slab by flushing all the per-cpu slabs and free > >> slabs in partial lists. This applies only to the root caches, though. > >> > >> Extends this capability by shrinking all the child memcg caches and > >> the root cache when a value of '2' is written to the shrink sysfs file. > > Why do we need a new value for this functionality? I would tend to think > > that skipping memcg caches is a bug/incomplete implementation. Or is it > > a deliberate decision to cover root caches only? > > It is just that I don't want to change the existing behavior of the > current code. It will definitely take longer to shrink both the root > cache and the memcg caches. If we all agree that the only sensible > operation is to shrink root cache and the memcg caches together. I am > fine just adding memcg shrink without changing the sysfs interface > definition and be done with it. I think its best and consistent behavior to shrink all memcg caches with the root cache. This looks like an oversight and thus a bugfix.