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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0CAABC433F5 for ; Wed, 20 Apr 2022 07:58:12 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 624D16B0072; Wed, 20 Apr 2022 03:58:12 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5AC2E6B0075; Wed, 20 Apr 2022 03:58:12 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 44CDF6B0078; Wed, 20 Apr 2022 03:58:12 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.27]) by kanga.kvack.org (Postfix) with ESMTP id 329076B0072 for ; Wed, 20 Apr 2022 03:58:12 -0400 (EDT) Received: from smtpin23.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id EA1A920E6B for ; Wed, 20 Apr 2022 07:58:11 +0000 (UTC) X-FDA: 79376504382.23.6328913 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by imf08.hostedemail.com (Postfix) with ESMTP id 95280160012 for ; Wed, 20 Apr 2022 07:58:09 +0000 (UTC) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 1D1A721112; Wed, 20 Apr 2022 07:58:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1650441490; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Zh1+qCZ/MYXJ0sRvzfY4sa1n6TDnYaGX5/J1ORSZtfg=; b=fK/qA+XzGW35/9w2tvE+4x0zKayfY5S1REDI0Hj+Wv7kazxwNLOX5GtAsN3xI2vwpGp0Li UpZRRdnfs3qfCIlF00lXuhhreXhdDvkhiNqTs6bgNrdBkgTBQwAOGtZqJv0+LppY79rot2 KuWaR/55MHeREPMSv9wljkh6Kuxns1w= Received: from suse.cz (unknown [10.100.224.162]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 9C31F2C142; Wed, 20 Apr 2022 07:58:09 +0000 (UTC) Date: Wed, 20 Apr 2022 09:58:09 +0200 From: Petr Mladek To: Luis Chamberlain Cc: "Edgecombe, Rick P" , "rppt@kernel.org" , "songliubraving@fb.com" , "linux-kernel@vger.kernel.org" , "bpf@vger.kernel.org" , "hch@infradead.org" , "ast@kernel.org" , "daniel@iogearbox.net" , "Torvalds, Linus" , "linux-mm@kvack.org" , "song@kernel.org" , "Kernel-team@fb.com" , "akpm@linux-foundation.org" , "hpa@zytor.com" , "dborkman@redhat.com" , "edumazet@google.com" , "bp@alien8.de" , "mbenes@suse.cz" , "imbrenda@linux.ibm.com" , Davidlohr Bueso , Adam Manzanares , Christophe Leroy Subject: Re: [PATCH v4 bpf 0/4] vmalloc: bpf: introduce VM_ALLOW_HUGE_VMAP Message-ID: References: <20220415164413.2727220-1-song@kernel.org> <4AD023F9-FBCE-4C7C-A049-9292491408AA@fb.com> <88eafc9220d134d72db9eb381114432e71903022.camel@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspam-User: X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 95280160012 X-Stat-Signature: jmddzdhxk8t6rn9foowx8yn46mticbwy Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=suse.com header.s=susede1 header.b="fK/qA+Xz"; spf=pass (imf08.hostedemail.com: domain of pmladek@suse.com designates 195.135.220.28 as permitted sender) smtp.mailfrom=pmladek@suse.com; dmarc=pass (policy=quarantine) header.from=suse.com X-HE-Tag: 1650441489-334720 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 2022-04-19 14:24:38, Luis Chamberlain wrote: > On Tue, Apr 19, 2022 at 01:56:03AM +0000, Edgecombe, Rick P wrote: > > Yea, that was my understanding. X86 modules have to be linked within > > 2GB of the kernel text, also eBPF x86 JIT generates code that expects > > to be within 2GB of the kernel text. > > And kprobes / live patching / ftrace. > > Another architectural fun fact, powerpc book3s/32 requires executability > to be set per 256 Mbytes segments. Some architectures like this one > will want to also optimize how they use the module alloc area. > > Even though today the use cases might be limited, we don't exactly know > how much memory a target device has a well, and so treating memory > failures for "special memory" request as regular memory failures seems > a bit odd, and users could get confused. For instance slapping on > extra memory on a system won't resolve any issues if the limit for a > special type of memory is already hit. Very likely not a problem at all today, > given how small modules / eBPF jit programs are / etc, but conceptually it > would seem wrong to just say -ENOMEM when in fact it's a special type of > required memory which cannot be allocated and the issue cannot possibly be > fixed. I don't think we have an option but to use -ENOMEM but at least > hinting of the special failure would have seem desirable. I am not mm expert but I think that this is common problem. There are many types of "special memory". And mm provides many details via procfs, e.g. /proc/meminfo, /proc/slabinfo, /proc/vmstat. Best Regards, Petr