From patchwork Mon Mar 2 22:25:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 11416483 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 8A973138D for ; Mon, 2 Mar 2020 22:26:45 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 4D2772465E for ; Mon, 2 Mar 2020 22:26:45 +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="axmB575g" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4D2772465E 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 886716B0005; Mon, 2 Mar 2020 17:26:44 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 80FE06B0006; Mon, 2 Mar 2020 17:26:44 -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 6D86B6B0007; Mon, 2 Mar 2020 17:26:44 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0090.hostedemail.com [216.40.44.90]) by kanga.kvack.org (Postfix) with ESMTP id 5253B6B0005 for ; Mon, 2 Mar 2020 17:26:44 -0500 (EST) Received: from smtpin19.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 3118FC5A7 for ; Mon, 2 Mar 2020 22:26:44 +0000 (UTC) X-FDA: 76551857928.19.cats80_8ef42096d18 X-Spam-Summary: 2,0,0,767f191715347c7d,d41d8cd98f00b204,daniel.vetter@ffwll.ch,,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:3353:3865:3866:3867:3868:3870:3871:3874:4321:4385:5007:6119:6261:6653:7903:8603:10004:11026:11232:11473:11658:11914:12043:12114:12296:12297:12438:12517:12519:12555:12895:13069:13161:13229:13311:13357:13618:13846:13894:14096:14181:14384:14394:14721:21080:21212:21444:21451:21627:21990:30054:30055:30064,0,RBL:209.85.221.65:@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:27,LUA_SUMMARY:none X-HE-Tag: cats80_8ef42096d18 X-Filterd-Recvd-Size: 4990 Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) by imf03.hostedemail.com (Postfix) with ESMTP for ; Mon, 2 Mar 2020 22:26:43 +0000 (UTC) Received: by mail-wr1-f65.google.com with SMTP id t11so1864027wrw.5 for ; Mon, 02 Mar 2020 14:26:43 -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=s9Dt4ZAHYBWy2uNMICh4RsHo7p4PctnYq6F5Xys1W4s=; b=axmB575g6/zkObum059v2q22BdYyNmVKduWj0jUdHrwBi6I6QBxULBBwvKOAPDVF0F ynlCpl5cL5YYdXdVnW7y1C6GV7Zp5eeuKEinsK4JVU2bw3gA3UShHustrxBxC4Eibr6w 50vlUFqWYkKfcKaT8kni/LQ12bAnHzJFdc9EI= 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=s9Dt4ZAHYBWy2uNMICh4RsHo7p4PctnYq6F5Xys1W4s=; b=sxN3ibSS1pOVdLiDmf1kHeNAsw18CsjcGTgLCaom2K63GHqNRyIHs69Bu3NGhcVAaZ QIMjjTzYxfKlmHJbAa69L2dZJi57SdzF0pMOGepAo9fuRFUNkeQ9qFikDaFGkh/6MzMP i+U3VRGNVQbIrkOvbq4phg9GpyyoUV0yNoTU/fCLPq8NUEf81AivtXQACzjXFEEss2ne lagw16gZJF7e4JnwojIbXfdU9QpoyWP8e/AEtdSHkRkoq+e4YPRBxx2FwaKUvXCvOMaZ K1+o+UhVTCOz9HDxuLa+0SHzcs2dcyg//ORNNk5qcVBj24vz2BYjjiwORnegiHHEECUe Alag== X-Gm-Message-State: ANhLgQ3h8OqrFhooJgjY9fdqxsCCixz2ARiNMU473jR1NtFjA95nriHO u4JhwpGDSBCPNuC2rxus4kN3Lw== X-Google-Smtp-Source: ADFU+vvoLh3Wsjn6JeoEhXLn14K8OJVwfkHDIumxe5Sg0X1KCKW9a5JdnvmTNxfHumu1ZYpZJebjdw== X-Received: by 2002:adf:f0cd:: with SMTP id x13mr1535430wro.69.1583188002191; Mon, 02 Mar 2020 14:26:42 -0800 (PST) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id o18sm26114589wrv.60.2020.03.02.14.26.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Mar 2020 14:26:41 -0800 (PST) From: Daniel Vetter To: DRI Development Cc: Intel Graphics Development , Daniel Vetter , Andrew Morton , Daniel Vetter , Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , linux-mm@kvack.org Subject: [PATCH 01/51] mm/sl[uo]b: export __kmalloc_track(_node)_caller Date: Mon, 2 Mar 2020 23:25:41 +0100 Message-Id: <20200302222631.3861340-2-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200302222631.3861340-1-daniel.vetter@ffwll.ch> References: <20200302222631.3861340-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. Acked-by: Andrew Morton 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 --- I plan to merge this through drm-misc-next (with Andrew's ack) once the remainder of the drm series is in shape. -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