From patchwork Mon Mar 23 14:49:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 11453101 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 A32B2174A for ; Mon, 23 Mar 2020 14:50:02 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 6625F20786 for ; Mon, 23 Mar 2020 14:50:02 +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="BPGIbJ7z" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6625F20786 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 8B0D76B0005; Mon, 23 Mar 2020 10:50:01 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 8892A6B0006; Mon, 23 Mar 2020 10:50:01 -0400 (EDT) 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 776B56B0007; Mon, 23 Mar 2020 10:50:01 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0019.hostedemail.com [216.40.44.19]) by kanga.kvack.org (Postfix) with ESMTP id 584696B0005 for ; Mon, 23 Mar 2020 10:50:01 -0400 (EDT) Received: from smtpin19.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 270DF349B for ; Mon, 23 Mar 2020 14:50:01 +0000 (UTC) X-FDA: 76626911802.19.thing18_1bf3810f02f X-Spam-Summary: 2,0,0,d584aa3e18ecec42,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.128.68:@ffwll.ch:.lbl8.mailshell.net-62.14.0.100 66.201.201.201,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:24,LUA_SUMMARY:none X-HE-Tag: thing18_1bf3810f02f X-Filterd-Recvd-Size: 4991 Received: from mail-wm1-f68.google.com (mail-wm1-f68.google.com [209.85.128.68]) by imf21.hostedemail.com (Postfix) with ESMTP for ; Mon, 23 Mar 2020 14:50:00 +0000 (UTC) Received: by mail-wm1-f68.google.com with SMTP id 6so14956041wmi.5 for ; Mon, 23 Mar 2020 07:50:00 -0700 (PDT) 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=tjiv7qMnzgqOGQnKm8diVuhQQwwy6h5FYe6sb8SS/Og=; b=BPGIbJ7zUeLKeMCPq3sTvwhWi2D36jWS3OLlIdaEwHqhCbqnJTzttVjGq1mCMgDw53 Ky4M0wRmf1jUv9n7w37UFxWMjX7B0KIWOWYQBgCTpNDpXDOa6ZYoPGZ3MbtLTD27elF6 sG6bBnDAUMGgjEPRVAVuPaiH+zAn3TITFyJb4= 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=tjiv7qMnzgqOGQnKm8diVuhQQwwy6h5FYe6sb8SS/Og=; b=bgD3eajBcpTJD7uA85ibbq+8pyA2FU36oE3se6ZtP1YYu0JN8io0GnDUryp0DCsphE rrbIYhigsn5I5sU5KFCaKXmRwuqhUs8Exzzn0bIlF9R/hj/ShqoDXmtrSoYlaRugv04F 5JRjIgxMpWKFEYaxYeuyLakyfTQJvl1fFoFjBzjrE4103QzkQ+3l4c9sW2MMfKvCVPc/ R2uJ/GlQgvg5o9AD8R4ou4Ta12pkBbi/NotLZlkYWijT8PVx7H0JIdt6djyNwl5Qy4+g 12/3ybJALlEEVcw/XTui8gc7tOB3PKDfSDAMjIzkkOuVspQcRNbZ0BRSQsr10tLUrKlL P74Q== X-Gm-Message-State: ANhLgQ2R6urO96NwqTW7E9sc8WmJIo+Mf5bOEVYMnZWOiKXD68ITZEFP uX7O7fxQM4Igr9u0qJgVrm1njA== X-Google-Smtp-Source: ADFU+vuIcvgB7enp1CCTvo6W5k+yimEtNaCgQhAy5LcBILNPuMVXRkdi3TkezLvpFn4vmaOSttl9DA== X-Received: by 2002:a1c:b4d4:: with SMTP id d203mr28192120wmf.85.1584974998322; Mon, 23 Mar 2020 07:49:58 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id s22sm20376522wmc.16.2020.03.23.07.49.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Mar 2020 07:49:57 -0700 (PDT) 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, 23 Mar 2020 15:49:00 +0100 Message-Id: <20200323144950.3018436-2-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200323144950.3018436-1-daniel.vetter@ffwll.ch> References: <20200323144950.3018436-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 2988dae3f692..a937de5182cc 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -4377,6 +4377,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, @@ -4407,6 +4408,7 @@ void *__kmalloc_node_track_caller(size_t size, gfp_t gfpflags, return ret; } +EXPORT_SYMBOL(__kmalloc_node_track_caller); #endif #ifdef CONFIG_SYSFS