From patchwork Wed Feb 19 10:20:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 11390925 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E5E48930 for ; Wed, 19 Feb 2020 10:21:35 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id A94BD24677 for ; Wed, 19 Feb 2020 10:21:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=ffwll.ch header.i=@ffwll.ch header.b="DSGYRAvh" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A94BD24677 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ffwll.ch Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 9D8846B0003; Wed, 19 Feb 2020 05:21:34 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 989F36B0006; Wed, 19 Feb 2020 05:21:34 -0500 (EST) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 89FA86B0007; Wed, 19 Feb 2020 05:21:34 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0027.hostedemail.com [216.40.44.27]) by kanga.kvack.org (Postfix) with ESMTP id 72DD46B0003 for ; Wed, 19 Feb 2020 05:21:34 -0500 (EST) Received: from smtpin24.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 0201C8248047 for ; Wed, 19 Feb 2020 10:21:34 +0000 (UTC) X-FDA: 76506484908.24.eyes46_64eea21a65225 X-Spam-Summary: 2,0,0,e5f33aa958fb42c6,d41d8cd98f00b204,daniel.vetter@ffwll.ch,:dri-devel@lists.freedesktop.org:intel-gfx@lists.freedesktop.org:daniel.vetter@ffwll.ch:daniel.vetter@intel.com:cl@linux.com:penberg@kernel.org:rientjes@google.com:iamjoonsoo.kim@lge.com:akpm@linux-foundation.org:,RULES_HIT:41:355:379:541:800:960:966:973:988:989:1260:1311:1314:1345:1359:1431:1437:1515:1534:1541:1711:1730:1747:1777:1792:2196:2199:2393:2559:2562:3138:3139:3140:3141:3142:3352:3865:3866:3867:3868:3870:3874:4321:4362:4385:5007:6119:6261:6653:7903:8603:10004:11026:11232:11473:11658:11914:12043:12114:12296:12297:12438:12517:12519:12555:12895:13069:13311:13357:13618:13846:13894:14096:14181:14384:14394:14721:21080:21212:21444:21451:21627:21990:30054:30055:30064,0,RBL:209.85.128.66:@ffwll.ch:.lbl8.mailshell.net-66.201.201.201 62.14.0.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:29,LUA_SUMMARY:none X-HE-Tag: eyes46_64eea21a65225 X-Filterd-Recvd-Size: 4891 Received: from mail-wm1-f66.google.com (mail-wm1-f66.google.com [209.85.128.66]) by imf35.hostedemail.com (Postfix) with ESMTP for ; Wed, 19 Feb 2020 10:21:33 +0000 (UTC) Received: by mail-wm1-f66.google.com with SMTP id q9so5839634wmj.5 for ; Wed, 19 Feb 2020 02:21:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=n6n0zYk64QTGBG4zICM+vk9+nqt3qLyHC/COsxsfEtI=; b=DSGYRAvhHhOJFcrVGJMtuv9XCixD5vL9GRs3U4gXgQUoD7sOm3dLZIBoYN9TZYLXc9 qMuSlQafZTCxj/z4lPv5FfjDv2GQBpZwQCtzb8mass6mKCtiLXfGneplK5Ig8BDjWNbF 9czhe8keGvjt783EJOBtCXIbx/n3nbHp76btg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=n6n0zYk64QTGBG4zICM+vk9+nqt3qLyHC/COsxsfEtI=; b=khP/pna04lz3u9RR4CpwJIARgc80w4fLy9Ku+2/7wDZRWsQ3Td8yc/ZAHu+kYsyAhM AwJOO3GAqVMhf0eiEi9uAI/qAqFcr8naKsv4yjIrOcpJJQpEq89ZeTgYCmfzBBRUKZoO FzKcwMk8lCFrCQNbGI73LsSXZKAL+g+e+yFtlyJt951sXQPqWUBdujHP+O9kKqlubopY KEAzBVC3ze/bKcRTefxXDnisHUT06AWL13YMEX6I9kbmjl5CZTYFbZuiE1JCstnRV8XJ 485CY6IHbbTD1EeNzPgQQlfG9knFNhoNY/uemlTqGcPPYNVDatbCbRZKrQM8fa5P3PiZ phew== X-Gm-Message-State: APjAAAX9Uu8jCzvTgLSqtyHRYOcDdC8e4IW8YiRhnHuoE8SDcP458tCB 9Z00wgK8orokozUlwXIOZXcMXA== X-Google-Smtp-Source: APXvYqzHXO/L/mmeE4mAEVOHg8DmRBreHxyB9Ewy8R5hgdUhfwO+3XuVVxPUuk4otK9cWdoWsixv/g== X-Received: by 2002:a05:600c:149:: with SMTP id w9mr8628850wmm.132.1582107692064; Wed, 19 Feb 2020 02:21:32 -0800 (PST) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id s23sm2370339wra.15.2020.02.19.02.21.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Feb 2020 02:21:31 -0800 (PST) From: Daniel Vetter To: DRI Development Cc: Intel Graphics Development , Daniel Vetter , Daniel Vetter , Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , linux-mm@kvack.org Subject: [PATCH 01/52] mm/sl[uo]b: export __kmalloc_track(_node)_caller Date: Wed, 19 Feb 2020 11:20:31 +0100 Message-Id: <20200219102122.1607365-2-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200219102122.1607365-1-daniel.vetter@ffwll.ch> References: <20200219102122.1607365-1-daniel.vetter@ffwll.ch> MIME-Version: 1.0 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: slab does this already, and I want to use this in a memory allocation tracker in drm for stuff that's tied to the lifetime of a drm_device, not the underlying struct device. Kinda like devres, but for drm. Signed-off-by: Daniel Vetter Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Andrew Morton Cc: linux-mm@kvack.org Acked-by: Andrew Morton Acked-by: Christoph Lameter --- Ack for merging through drm trees very much appreciated. Thanks, Daniel --- mm/slob.c | 2 ++ mm/slub.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/mm/slob.c b/mm/slob.c index fa53e9f73893..ac2aecfbc7a8 100644 --- a/mm/slob.c +++ b/mm/slob.c @@ -524,6 +524,7 @@ void *__kmalloc_track_caller(size_t size, gfp_t gfp, unsigned long caller) { return __do_kmalloc_node(size, gfp, NUMA_NO_NODE, caller); } +EXPORT_SYMBOL(__kmalloc_track_caller); #ifdef CONFIG_NUMA void *__kmalloc_node_track_caller(size_t size, gfp_t gfp, @@ -531,6 +532,7 @@ void *__kmalloc_node_track_caller(size_t size, gfp_t gfp, { return __do_kmalloc_node(size, gfp, node, caller); } +EXPORT_SYMBOL(__kmalloc_node_track_caller); #endif void kfree(const void *block) diff --git a/mm/slub.c b/mm/slub.c index be2854b5b1c9..7271fb235ed8 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -4358,6 +4358,7 @@ void *__kmalloc_track_caller(size_t size, gfp_t gfpflags, unsigned long caller) return ret; } +EXPORT_SYMBOL(__kmalloc_track_caller); #ifdef CONFIG_NUMA void *__kmalloc_node_track_caller(size_t size, gfp_t gfpflags, @@ -4388,6 +4389,7 @@ void *__kmalloc_node_track_caller(size_t size, gfp_t gfpflags, return ret; } +EXPORT_SYMBOL(__kmalloc_node_track_caller); #endif #ifdef CONFIG_SYSFS