From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D6737C4320D for ; Tue, 24 Sep 2019 12:04:03 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id B2CE721655 for ; Tue, 24 Sep 2019 12:04:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B2CE721655 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 2823E6B000A; Tue, 24 Sep 2019 08:04:03 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 232FB6B000C; Tue, 24 Sep 2019 08:04:03 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 121A46B000D; Tue, 24 Sep 2019 08:04:03 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0081.hostedemail.com [216.40.44.81]) by kanga.kvack.org (Postfix) with ESMTP id E75946B000A for ; Tue, 24 Sep 2019 08:04:02 -0400 (EDT) Received: from smtpin04.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with SMTP id 68FF56D6C for ; Tue, 24 Sep 2019 12:04:02 +0000 (UTC) X-FDA: 75969680724.04.lunch01_5d6e280eead1f X-HE-Tag: lunch01_5d6e280eead1f X-Filterd-Recvd-Size: 2189 Received: from mx1.suse.de (mx2.suse.de [195.135.220.15]) by imf11.hostedemail.com (Postfix) with ESMTP for ; Tue, 24 Sep 2019 12:04:01 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id A0E30ACC3; Tue, 24 Sep 2019 12:04:00 +0000 (UTC) Date: Tue, 24 Sep 2019 14:04:00 +0200 From: Michal Hocko To: Mircea CIRJALIU - MELIU Cc: "linux-mm@kvack.org" , "cl@linux.com" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] slab, memcontrol: undefined reference to `memcg_kmem_get_cache' Message-ID: <20190924120400.GN23050@dhcp22.suse.cz> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) 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: On Tue 24-09-19 08:46:48, Mircea CIRJALIU - MELIU wrote: > Having CONFIG_MEMCG turned off causes these issues: > mm/slub.o: In function `slab_pre_alloc_hook': > /home/mircea/build/mm/slab.h:425: undefined reference to `memcg_kmem_get_cache' > mm/slub.o: In function `slab_post_alloc_hook': > /home/mircea/build/mm/slab.h:444: undefined reference to `memcg_kmem_put_cache' You should be adding your Sign-off-by to every patch you post to the kernel mailing list (see Documentation/SubmittingPatches). It is also really important to mention which tree does this apply to and ideally also note which change has broken the code. In this particular case I have tried the current Linus tree (4c07e2ddab5b) and $ grep 'CONFIG_SLUB\|CONFIG_MEMCG' .config # CONFIG_MEMCG is not set CONFIG_SLUB_DEBUG=y CONFIG_SLUB=y CONFIG_SLUB_CPU_PARTIAL=y # CONFIG_SLUB_DEBUG_ON is not set # CONFIG_SLUB_STATS is not set which means CONFIG_MEMCG_KMEM is not enabled as well. And the compilation succeeds. What is your config file? -- Michal Hocko SUSE Labs