From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 76F6C46BF for ; Tue, 28 Jan 2025 04:19:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738037949; cv=none; b=dxc60ztpTynvcAwcxj88B5M9e9Vva7e9YWCntrTG6ePz8d41CxJKQGzPFZ37ad04Ai9cn08TiqA1wmCt9X3QEc31isTSYmF0zjKVCYPUe1oHgEgVEo9Bl/ItyKQ9iQw1p/WnrMOAbADBd21dyJHHLU2kjh+z9g8Klbl0PFkVpKA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738037949; c=relaxed/simple; bh=6i1YCmuo/BtGKB1XdmkRBix4JHAjfAG5jxjd4qwlIw8=; h=Date:From:To:Cc:Subject:Message-Id:In-Reply-To:References: Mime-Version:Content-Type; b=OXiZhKsiOm6rgiZSqZXBKLoMGKrZei+Q3lE7ob9cwklPidcdgxgl73Ua8V/Ws4cNZJVzkO59vcFkU9Q2mU4rq/xeKZ9m96GEUgkLtZkU7dt75lG0XHOno3I3xUPejICTTeEfJGp3DRpmIehvnfXd+BMi6GEoi6prIK6u9sCdFIM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=W64YSVF+; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="W64YSVF+" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 83B6FC4CED3; Tue, 28 Jan 2025 04:19:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1738037948; bh=6i1YCmuo/BtGKB1XdmkRBix4JHAjfAG5jxjd4qwlIw8=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=W64YSVF+URDE0M9nFMwzbx9qbltKPDW4XkcFfl85x5KoTFCaGHZPh5JiLHnXz6CyY Ac3OdGFl0DyIdWWNgqn0QoTPKpFsA8XlQ+F4+gdcWRuUEwwgI01haXFDrnF/rNlYZ5 Jo69JMtesJnRdxc7ocJWXY9vTPSVKj9CLPGdsqO4= Date: Mon, 27 Jan 2025 20:19:07 -0800 From: Andrew Morton To: Frank van der Linden Cc: muchun.song@linux.dev, linux-mm@kvack.org, linux-kernel@vger.kernel.org, yuzhao@google.com, usama.arif@bytedance.com, joao.m.martins@oracle.com, roman.gushchin@linux.dev Subject: Re: [PATCH 02/27] mm, cma: support multiple contiguous ranges, if requested Message-Id: <20250127201907.17a230262bedaf36c5185575@linux-foundation.org> In-Reply-To: <20250127232207.3888640-3-fvdl@google.com> References: <20250127232207.3888640-1-fvdl@google.com> <20250127232207.3888640-3-fvdl@google.com> X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Mon, 27 Jan 2025 23:21:42 +0000 Frank van der Linden wrote: > Currently, CMA manages one range of physically contiguous memory. > Creation of larger CMA areas with hugetlb_cma may run in to gaps > in physical memory, so that they are not able to allocate that > contiguous physical range from memblock when creating the CMA > area. > This one breaks my x86_64 allmodconfig build, which I find surprising. Did I miss some dependency? mm/cma_debug.c: In function 'cma_maxchunk_get': mm/cma_debug.c:51:38: error: too few arguments to function 'cma_bitmap_maxno' 51 | unsigned long bitmap_maxno = cma_bitmap_maxno(cma); | ^~~~~~~~~~~~~~~~ In file included from mm/cma_debug.c:16: mm/cma.h:56:29: note: declared here 56 | static inline unsigned long cma_bitmap_maxno(struct cma *cma, | ^~~~~~~~~~~~~~~~ mm/cma_debug.c:55:49: error: 'struct cma' has no member named 'bitmap'; did you mean 'dfs_bitmap'? 55 | start = find_next_zero_bit(cma->bitmap, bitmap_maxno, end); | ^~~~~~ | dfs_bitmap mm/cma_debug.c:58:42: error: 'struct cma' has no member named 'bitmap'; did you mean 'dfs_bitmap'? 58 | end = find_next_bit(cma->bitmap, bitmap_maxno, start); | ^~~~~~ | dfs_bitmap In file included from mm/cma_debug.c:9: mm/cma_debug.c: In function 'cma_debugfs_add_one': mm/cma_debug.c:169:33: error: 'struct cma' has no member named 'base_pfn' 169 | &cma->base_pfn, &cma_debugfs_fops); | ^~ ./include/linux/debugfs.h:129:38: note: in definition of macro 'debugfs_create_file' 129 | (name, mode, parent, data, fops) | ^~~~ mm/cma_debug.c:176:45: error: 'struct cma' has no member named 'bitmap'; did you mean 'dfs_bitmap'? 176 | cma->dfs_bitmap.array = (u32 *)cma->bitmap; | ^~~~~~ | dfs_bitmap In file included from ./include/vdso/const.h:5, from ./include/linux/const.h:4, from ./include/linux/list.h:9, from ./include/linux/wait.h:7, from ./include/linux/wait_bit.h:8, from ./include/linux/fs.h:6, from ./include/linux/debugfs.h:15: mm/cma_debug.c:177:51: error: too few arguments to function 'cma_bitmap_maxno' 177 | cma->dfs_bitmap.n_elements = DIV_ROUND_UP(cma_bitmap_maxno(cma), | ^~~~~~~~~~~~~~~~ ./include/uapi/linux/const.h:51:40: note: in definition of macro '__KERNEL_DIV_ROUND_UP' 51 | #define __KERNEL_DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d)) | ^ mm/cma_debug.c:177:38: note: in expansion of macro 'DIV_ROUND_UP' 177 | cma->dfs_bitmap.n_elements = DIV_ROUND_UP(cma_bitmap_maxno(cma), | ^~~~~~~~~~~~ mm/cma.h:56:29: note: declared here 56 | static inline unsigned long cma_bitmap_maxno(struct cma *cma, | ^~~~~~~~~~~~~~~~