Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp3668848ybe; Sun, 15 Sep 2019 21:56:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqz+X3G8ZBNPHb39Uqkc1BqyWIbaqxjXxSavnGoMt2lsnU6QNAvGK29XJ7RSmTEYBjg2mFnh X-Received: by 2002:a05:6402:2045:: with SMTP id bc5mr13555325edb.248.1568609809754; Sun, 15 Sep 2019 21:56:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568609809; cv=none; d=google.com; s=arc-20160816; b=x/XzfyC+q+pQ+ht2xeBTVu5fLeIybL32K0Ujd2dggnU4wqXKiManeSRFREF9eYE/Qf pB8izS+gqoElHd2Gh9dwk8aYUMqS+0u3hbqoO+ksWru5yR5pflrxaG315PDdNu9XHBOx qkf0RLZU0YMdDFVXqf5R5zom3i4xFTlCC0C/qjdZd4dqSalyoeDMEzxCCl1uFqhHbCJy Ths+5TY5NlFqlztktzpZ6AspUQsAp8fUP4qOPca60JUDwf4SQFiTJCoPYTw4M+pxIzFK V2sWMt7GudgECQ70eLQsw0giEcMpeSCOTiPW25NxIi7k8pn+UbibE/1dHDPgYCJvP4To Qgpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date:dkim-signature; bh=koJcYOUTlP8dmjZ2X7GWHStdMBs1e8qInHJs23SEU3A=; b=Ftg9h0N3x5BPg0amnXM8/kI1l6JNRv/N4PAzQKKVYj/wkZPeXUKwt/HG6f4L/kErGc +mVfuL79VumMPc/eWZX/HP7OFa+r2s9d70b1gJHCkD55sL6uh7+cucft/v2By5LSw5rU 8aSE2xKwDWLn5ZE/27X+jFeXnxReiQdcrHn6wlTi4s8Zivsu4Y1BUkR9NWMu7Ae/PQIN aVVsRWa8W4A32QUK5fnT2v8u8K+7lLErbrx5kfqT7CxPCKBYvMNGfaqhQinA/OezdSMG +PZ6+ugS1urSo4BhZ227pyr76eTx+GKsTScvef0CPR/jrFNpm+b1PlziBncMlsYyzfZP uKaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=prXjSPs1; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q16si17817833ejm.267.2019.09.15.21.55.54; Sun, 15 Sep 2019 21:56:49 -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=@google.com header.s=20161025 header.b=prXjSPs1; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728513AbfIOVi3 (ORCPT + 99 others); Sun, 15 Sep 2019 17:38:29 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:37200 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728384AbfIOVi2 (ORCPT ); Sun, 15 Sep 2019 17:38:28 -0400 Received: by mail-pg1-f195.google.com with SMTP id c17so10691776pgg.4 for ; Sun, 15 Sep 2019 14:38:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=koJcYOUTlP8dmjZ2X7GWHStdMBs1e8qInHJs23SEU3A=; b=prXjSPs1he8jMpxQzp/JwdtNAB4dE1suvhQ71t179GrGEpSqVdjZALzQgMU/YoMiAY elr7+CrXRuhoMYPFvZGuyIDp+MeRnpqlMX5YOqGmDdImMf3aYtwEDhLY3lJldR9ueytZ vrXlfqj3YH7HxFXqs24ZhMca+S3jHjmswT38WSJbbFFvUKfV7/qjciF2YPK9HBfCBZ/a l7hWTUZ/hv1myKLJr6XvRDedsA8r13PuvVhE8vlMWBjMrccdxK/7V1I9B3rR5sn7xsJB HZf/ZVkuHA6VVT4Qm+PrEKJycRHgvnFit+gp6I1ufmXhz6TNnS7G2s1m0NW7CHBw21FR GsnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=koJcYOUTlP8dmjZ2X7GWHStdMBs1e8qInHJs23SEU3A=; b=iUIBVOVc2f4iGMmOKkwNVzhPNziSaVeuEEOtjstVZYRsmHteKGTVB8gXr/210QiWwu B6Zd0pUInc9mmek2/M7TGFsM12LhVNGKvfkCfiixdbXOZOjeQAGPh9awv+VQFZtVNr5E BBUFFDMkBLE0m696jOLDCsMSTGrmHUgaARrvfFTXI5gEo+1RFWOA/D6+v0ZVraQvJ/Vs CqHvJcQndqdEUaM+ai6CzXHTduHOXz237sofV7wO9kYy8O9AfynFXVKbEb3kQR5pCkcu /rg2nUV/vPanNwUuLbjOHufLqtfAOvOBm1rSYVIdeI6e/xqx1OJXOxVnadGJgHmFg1Sf Voyg== X-Gm-Message-State: APjAAAW9C7mSr3yuxmT/L4IIGEyL3J2LH/JEyxBoNl5dzCCMt5pgsAfW 2CzfSrNIEdgS5HGd85Ok7evI+g== X-Received: by 2002:a63:550a:: with SMTP id j10mr1174836pgb.369.1568583507616; Sun, 15 Sep 2019 14:38:27 -0700 (PDT) Received: from [2620:15c:17:3:3a5:23a7:5e32:4598] ([2620:15c:17:3:3a5:23a7:5e32:4598]) by smtp.gmail.com with ESMTPSA id j9sm9816411pff.128.2019.09.15.14.38.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 Sep 2019 14:38:26 -0700 (PDT) Date: Sun, 15 Sep 2019 14:38:26 -0700 (PDT) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: Pengfei Li cc: akpm@linux-foundation.org, vbabka@suse.cz, cl@linux.com, penberg@kernel.org, iamjoonsoo.kim@lge.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, guro@fb.com Subject: Re: [RESEND v4 1/7] mm, slab: Make kmalloc_info[] contain all types of names In-Reply-To: <20190915170809.10702-2-lpf.vector@gmail.com> Message-ID: References: <20190915170809.10702-1-lpf.vector@gmail.com> <20190915170809.10702-2-lpf.vector@gmail.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 16 Sep 2019, Pengfei Li wrote: > There are three types of kmalloc, KMALLOC_NORMAL, KMALLOC_RECLAIM > and KMALLOC_DMA. > > The name of KMALLOC_NORMAL is contained in kmalloc_info[].name, > but the names of KMALLOC_RECLAIM and KMALLOC_DMA are dynamically > generated by kmalloc_cache_name(). > > This patch predefines the names of all types of kmalloc to save > the time spent dynamically generating names. > > Besides, remove the kmalloc_cache_name() that is no longer used. > > Signed-off-by: Pengfei Li > Acked-by: Vlastimil Babka > Acked-by: Roman Gushchin Acked-by: David Rientjes It's unfortunate the existing names are kmalloc-, dma-kmalloc-, and kmalloc-rcl- since they aren't following any standard naming convention. Also not sure I understand the SET_KMALLOC_SIZE naming since this isn't just setting a size. Maybe better off as INIT_KMALLOC_INFO? Nothing major though, so: Acked-by: David Rientjes