From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 601B5C433B4 for ; Wed, 5 May 2021 20:39:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3B98F613E6 for ; Wed, 5 May 2021 20:39:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235029AbhEEUkg (ORCPT ); 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-Google-Smtp-Source: ABdhPJwyjIJjTM32S0Z6f0x0NjAwi/xcgU0hmTHM9xcAkdHxxrQLvzP7kWQl3Yxthm0XYBQaRaD9jnVAMVmt3TnFO9o= 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 90134C433ED for ; Wed, 5 May 2021 20:39:38 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 20A3C613E6 for ; Wed, 5 May 2021 20:39:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 20A3C613E6 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 8EAD56B0070; Wed, 5 May 2021 16:39:37 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 872096B0071; Wed, 5 May 2021 16:39:37 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 739FF6B0072; Wed, 5 May 2021 16:39:37 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0101.hostedemail.com [216.40.44.101]) by kanga.kvack.org (Postfix) with ESMTP id 56DA46B0070 for ; Wed, 5 May 2021 16:39:37 -0400 (EDT) Received: from smtpin14.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 0E52898A0 for ; Wed, 5 May 2021 20:39:37 +0000 (UTC) X-FDA: 78108343194.14.5EFA201 Received: from mail-lf1-f42.google.com (mail-lf1-f42.google.com [209.85.167.42]) by imf27.hostedemail.com (Postfix) with ESMTP id 19FC380192F1 for ; Wed, 5 May 2021 20:39:05 +0000 (UTC) Received: by mail-lf1-f42.google.com with SMTP id c11so4478749lfi.9 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=fNcMOThThhdXl7FxVDy98qUCMl7ONcDROxwL2pxP9et+2VOAqccFL6SPoEH2HaAkYH 2ZhDoKW5ejIGHr3g07euEP9nkte4nOlsls8EP6dWmqc1esQlOxncHB4zZfHw6/Dpap8I xnNsRN04ChY/dfW5D/1YxqP4bm2OubCNm38KUWCq6swuSfECEYTpdT10Qw4Rd2rxQGmY CdOgz0yoad8TXhpyakFuA/41QFJRrUNp8WleQE9Ire1LrP5zhtZ70qSfpY7j6oSGWd7f L8NgOUZRPCKbi8DPF8S6VoKu0RyV9YMIy+eMSd+qBYGt1yNFgp64vajWL+SyjvHLncsi zQdQ== X-Gm-Message-State: AOAM5336cMlbNBksCvcF6Er2KF31YWx5OBio2eLfekqvnmayrTUNCJMS f5cVKOmZhHwqHp/L/7mrgtxNgIuX5IbanZA+BlbUDQ== X-Google-Smtp-Source: ABdhPJwyjIJjTM32S0Z6f0x0NjAwi/xcgU0hmTHM9xcAkdHxxrQLvzP7kWQl3Yxthm0XYBQaRaD9jnVAMVmt3TnFO9o= 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" X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 19FC380192F1 X-Stat-Signature: u77hiohc1uhzp1u84nbag1h75pbufydj Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=google.com header.s=20161025 header.b=reGxAsDm; spf=pass (imf27.hostedemail.com: domain of shakeelb@google.com designates 209.85.167.42 as permitted sender) smtp.mailfrom=shakeelb@google.com; dmarc=pass (policy=reject) header.from=google.com Received-SPF: none (google.com>: No applicable sender policy available) receiver=imf27; identity=mailfrom; envelope-from=""; helo=mail-lf1-f42.google.com; client-ip=209.85.167.42 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1620247145-360415 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Shakeel Butt Subject: Re: [PATCH v4 3/3] mm: memcg/slab: Disable cache merging for KMALLOC_NORMAL caches Date: Wed, 5 May 2021 13:39:23 -0700 Message-ID: References: <20210505200610.13943-1-longman@redhat.com> <20210505200610.13943-4-longman@redhat.com> Mime-Version: 1.0 Return-path: 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== In-Reply-To: <20210505200610.13943-4-longman-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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 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