Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp4559786ybe; Mon, 16 Sep 2019 14:27:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqwEprYRtW412KK6gmHlyB/XBpoDagVN8LwQfz6iEZt9VDOFnDTi43W97pmc4gypS/lgZ1NK X-Received: by 2002:a17:906:b7c9:: with SMTP id fy9mr1843544ejb.237.1568669271059; Mon, 16 Sep 2019 14:27:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568669271; cv=none; d=google.com; s=arc-20160816; b=I5mXahfHXPzrCZsN+0IPugQOw73e+wJ+u9+35oy2vTsaTyoNe4xGLefSunhczY1Cjr NhEX//1vocVbw9vMmDG1NpMDCs121jpTYAQU06lPJITahBB+rfb8m9G+vnO8XI7EiCyj rVH2HBj+57GEirYCCqzaK+marwOH+YmLgsldIYDBgqjwjRSOouvcttzNHBsr2xQNSYwt 1+Fy8pfWHnhCD4a2DwRnht/wBWFPSk8aHPgq9UkCPYwfaLgdjtHPEJxTu8UOstntvnGr 2e1dPHe6KkBd7PBTgn7KQ/RmJQhTYzKQ6PhiK1N3rPkmlHAg/yvqsrShtaEEAtNdJtx4 QO6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=Rz4fstL5PcNeH2URZIP6JUFkj0ovCM3jsOukQ2mghT8=; b=DB3gjLlUHYIxVVAJ2C2KVkRcdvVdeDDnkJeoWYy8ApE8kh4F6ipm+peDKVgjjs71F7 9G1bBqYW4jpOW/kWRqPxStue7Gp/cPlAz9dbhoVAA2XWJuA4eXC+zmpjUp+n/eMOcNi/ sxuHzJzFliKmwnSQ8zagdOhEvrxmlkht4I9RflijVQwvolCLzfZDto1J6JcFEmUpPFRU MY8pwamtfcRgRjx5oAUvzm2BhCKgJNfpidL5FMgS5BRFoqrS0+MIWiKqaI1XveIwa6ft 0UhkEN/aO3SiHyiao2jc75UANhQXUAzTh8KlMHpJ4U1sl1Piox5KEKRZwH/oF5ERzJn+ zPGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=LxDbhb+s; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l23si162831eds.310.2019.09.16.14.27.27; Mon, 16 Sep 2019 14:27:51 -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=@gmail.com header.s=20161025 header.b=LxDbhb+s; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387425AbfIPOw1 (ORCPT + 99 others); Mon, 16 Sep 2019 10:52:27 -0400 Received: from mail-oi1-f196.google.com ([209.85.167.196]:37160 "EHLO mail-oi1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726690AbfIPOw1 (ORCPT ); Mon, 16 Sep 2019 10:52:27 -0400 Received: by mail-oi1-f196.google.com with SMTP id i16so3143401oie.4 for ; Mon, 16 Sep 2019 07:52:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Rz4fstL5PcNeH2URZIP6JUFkj0ovCM3jsOukQ2mghT8=; b=LxDbhb+sepV6hNiFf95ePSFVMHfW7m75L/eVS418Gb9PcMncY1GPn8YZ9A1SzBayDC ns+kJqdBBZP/YTxzVax4rw2aqHPjoxe20u934Qu7y4rp6M2Jd2zcL/hvwYoBORFVGfg+ i5pEwuAes4nlW6z/JhIH/rJHelMu98T3P0ueBWpcBFF5EgRV8mmKKML6Faw9na4/qoSw 6mgOC3io0FXPm6aPRXxGlZkEwa3ocY2GtPvHzO7SfAJ6YC1cbNY1PHPh0MsxuRhRI70k zkYwjhech/VTX25+jUeOE8rg64XS4l2i6h9zEJUDlQ3VKM5l71QqqYtexpJ3xADP3mMT g7xA== 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=Rz4fstL5PcNeH2URZIP6JUFkj0ovCM3jsOukQ2mghT8=; b=iWedMP1i7U+v6oYVNpe6+EUDeGFCxZgv72rPJHiv+TZbEuFQiiZCv1cThKGVpLifKs kuqDwf1zifx6+8CJuVSj3mz4OQL2SwH6sHYmn95xp3yjGE/hxlGHKjOYMTvb0uNmCDPr nf/WdiYmLKc3tQKhnDhSHVhcTX3cH3126NtNfF6jHlI/uMjt4a58MQBUfK+vA8pi+Ief lrFKWWBJUnig/SswQRJKlm31J+M3KsurPlmENL+ovo9s9TWMHGJCceNC0IzvO4P6MI03 jrJThp0pI5UMqyG2ctmd2BG1OaBIdyUICVpcRFqxF5ypIgzz7cMFi0v8FvFWMBpUQGxJ qCtw== X-Gm-Message-State: APjAAAWi2+GJfYMrOYHF8b/zXw8TcAUB2cYmLIuG7viLjo1hqk4naX9i lRtGzRTH1MDsvjIHIxsm7Phn8Ha91ftzTJWt1Dw= X-Received: by 2002:aca:c38b:: with SMTP id t133mr138124oif.22.1568645546529; Mon, 16 Sep 2019 07:52:26 -0700 (PDT) MIME-Version: 1.0 References: <20190915170809.10702-1-lpf.vector@gmail.com> <20190915170809.10702-2-lpf.vector@gmail.com> In-Reply-To: From: Pengfei Li Date: Mon, 16 Sep 2019 22:52:15 +0800 Message-ID: Subject: Re: [RESEND v4 1/7] mm, slab: Make kmalloc_info[] contain all types of names To: David Rientjes Cc: Andrew Morton , Vlastimil Babka , Christopher Lameter , penberg@kernel.org, iamjoonsoo.kim@lge.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Roman Gushchin Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 16, 2019 at 5:38 AM David Rientjes wrote: > > 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 > Thanks. > 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? Yes, this name is really better. I will rename SET_KMALLOC_SIZE to INIT_KMALLOC_INFO in v5. > > Nothing major though, so: > > Acked-by: David Rientjes