Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp795400pxy; Wed, 5 May 2021 14:13:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzvpa0WGQoKAivJTstT7zNbMMpjJQK6B4WlIYEekkYFZ0Nb7Ufs34KzuX2kCzTDnLvV077S X-Received: by 2002:a05:6402:1643:: with SMTP id s3mr1040694edx.280.1620249213636; Wed, 05 May 2021 14:13:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620249213; cv=none; d=google.com; s=arc-20160816; b=H3NKaKqloFL6UhRd4sOqaEJ37nHbVbwCKw2GSdABcr8r425vGREERW1yugu3EmeNRN BcdX5ZRR+C9G/rYKi3XW1JJkRT0+WSoiCsSdSiiVhddFSlCiQmUb0gHcWFyvGDdInX8s BUqbjdHC1tC3kbwWZadltjPTTBDUsZiky9MTlhxUQfEoSOFvcSPBDOYiVzHxLPG+P+VE ghnbYBqJXFTOOJgdqRUj9jqB/SE6ZXBXUfL9BPrxkQJ+6zdyQgeahdvPBvxq4tZvszI3 gAqmFwg7bQnSCKlv+JhRRei6PKK1U3udCRZLbhfA8/GSbkUdsFuVeBJYmaMCrl8mXoMN MP/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=7vLE3pRIE7DJyqWPEwNMu12YoYQF5DlZNk2exGmPNTg=; b=UEK2Wr80RWxDdRzFTELR98R4kLW/OUs26aZS8z6CHbuDNCFeOt84MjiUs5DQ/uWjhz vsdrRpRrnOUp/b1GP6FaTGGmqbOIefKOIw8suW8D6QWMKvriCdcPNeutTtk+RcSigj0L 4hPAos8JVrcimKaZOxo4Rru/FRbWpX+/JEDRYb4cYPCapSqyL//H859epMc73HT2mpZg cc12Nwg5oCEty6PvOmyU5R/IXBa85kTPoLmcPE9HUOCVxnDFCrSc5Uy5NFHnc9Fglosp Py7SRqegCh/N5DDdByV4tkbHmK6Rf6q2iM+9z2jg7MzJsDYy4sxPm2QQNI1eeEPSM8Fx 56/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=reGxAsDm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q21si366546edr.182.2021.05.05.14.13.10; Wed, 05 May 2021 14:13:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=reGxAsDm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234675AbhEEUkg (ORCPT + 99 others); Wed, 5 May 2021 16:40:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36514 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234566AbhEEUkd (ORCPT ); Wed, 5 May 2021 16:40:33 -0400 Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [IPv6:2a00:1450:4864:20::12c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9D648C06174A for ; Wed, 5 May 2021 13:39:36 -0700 (PDT) Received: by mail-lf1-x12c.google.com with SMTP id c3so4499247lfs.7 for ; Wed, 05 May 2021 13:39:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=7vLE3pRIE7DJyqWPEwNMu12YoYQF5DlZNk2exGmPNTg=; b=reGxAsDmGcDNeDbtupo1tbWXa6T9XrjZqX3xyHKEQtoI1PKUnAMqbp4g8ZsJ/CLTb5 49+eRQ6l2rhVksKqKYfARh9s6gTXQQY3zw5x5PktHltVzCFFrT8fD6E9tQ1w6fqoUHLQ 9VeKmoIRKKa5X8sZVI6cywPDotAAF54/q4y4zxIr+EU5A91PYBnNL9QQ5K/VNQhbm8Wv 35TmQ+AJVmjxZiEsJyt0bfVgsoI65T3kYwAHHPmXB9KdNsE+AFrsUBWtqTArNWUuvVqj t52WBgYsk9My43JMjwehdnmbZ3xJO/xvBAUyJo/YYJWoJXOQu/xwY6qrLYyCDvDt0TXX Vssg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=7vLE3pRIE7DJyqWPEwNMu12YoYQF5DlZNk2exGmPNTg=; b=p+G0sIpc2kM5c+VS9CgnlhWGdALLRKMS65QgfTb4m42auIxKH1ob3Qk/ad6MNbiLCW mtWK2WDciS2McCB4RJI8oIy2HVIcQVFfsBJj2RUzLg9HFhxnatIpKSyqnw2fs+1q/nFp aFrKANJbUJI6QeJblTlPhH5khr2GqRKR8IzV3NS9nNOqPDIkmvyaL5cKpJyVUyU6JgWV mD9viFMD6Co6q8RMj1ydxzMX/V9fuQ/3bhI9OhGfLFHYuUrdvAqm4q1onTjyS32rb0QH Mu0YQCUoDVpv2YiosE9nGV/69g0RLvH0fGWsNZJK2xYJxZK2ao/Eg4o61Rls8fPfppJh 8Mxg== X-Gm-Message-State: AOAM531zcqRoyMq83U5i1xLLCCADWJfOGiho34tJKhgtFN21mtqHjTse Be2syqekhy2bi6o8oeS+ML2P8sfJYPVLz/myzDESfg== X-Received: by 2002:ac2:5b1b:: with SMTP id v27mr417118lfn.549.1620247174619; Wed, 05 May 2021 13:39:34 -0700 (PDT) MIME-Version: 1.0 References: <20210505200610.13943-1-longman@redhat.com> <20210505200610.13943-4-longman@redhat.com> In-Reply-To: <20210505200610.13943-4-longman@redhat.com> From: Shakeel Butt Date: Wed, 5 May 2021 13:39:23 -0700 Message-ID: Subject: Re: [PATCH v4 3/3] mm: memcg/slab: Disable cache merging for KMALLOC_NORMAL caches To: Waiman Long Cc: Johannes Weiner , Michal Hocko , Vladimir Davydov , Andrew Morton , Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Vlastimil Babka , Roman Gushchin , LKML , Cgroups , Linux MM Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 5, 2021 at 1:06 PM Waiman Long wrote: > > The KMALLOC_NORMAL (kmalloc-) caches are for unaccounted objects only > when CONFIG_MEMCG_KMEM is enabled. To make sure that this condition > remains true, we will have to prevent KMALOC_NORMAL caches to merge > with other kmem caches. This is now done by setting its refcount to -1 > right after its creation. > > Suggested-by: Roman Gushchin > Signed-off-by: Waiman Long Reviewed-by: Shakeel Butt