From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f179.google.com (mail-pl1-f179.google.com [209.85.214.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4689F18890A for ; Thu, 12 Sep 2024 06:20:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.179 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726122044; cv=none; b=VAszSBvsOAqGPE+GPSIP0FZ2286/gZEZbTWvUHJJuxx9Zevrhx9rTj+Hoicrxi4blyOv4dZQGuKp/nz9Cl3ZQCu3Z06b+3Bo4+gCQG54BZbvFrknH3k6TlEUPSLNXP/e262Gkg+ZCvQ6wcU18kBx4UkAsboeFdAl0dFhxd1dDIw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726122044; c=relaxed/simple; bh=2F6IKkpv/Qwlr7Q/6xNHbyfy5PQ3xNesTPaXOFDb4UY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=LwjFN3Ipgz2M2eQGI37XJvijCD4hEVfXwYcBqZm01Lzj3xZfjPwHdK2qNBrXPb888yC/JAHcMRtPeCf2M+Wr6CWu2oD4S+kft9fGcWQ5pu/WyUNaAPceozTdiVhUcLE0CLuCV1T8urJxRGBGzGhNacvu+fuxyrcXXn3Lw96O22I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com; spf=pass smtp.mailfrom=rivosinc.com; dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b=f7ImMjz5; arc=none smtp.client-ip=209.85.214.179 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rivosinc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b="f7ImMjz5" Received: by mail-pl1-f179.google.com with SMTP id d9443c01a7336-2053525bd90so6138975ad.0 for ; Wed, 11 Sep 2024 23:20:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1726122042; x=1726726842; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=4MH+VWCTNjiA22bJ+vIa1h0/NxuAZxX6cpAlaipl1hg=; b=f7ImMjz5nD3GVetxCwMWoMX0kbIS4lvT7rEllYmLdT1KxiOENjPfwGS0uGx1s49aoE e+S6xHj/IwKOfMTOWQabXZVX65tJFPq0fLcBDOfXfsFJhwEvgMvrUr9UlGXPbcb7Lay4 Gi/IQ6rnGZ8UYdmka+oBZwvNaR+WwIpIymqItrNmjNailKIQdWCBeH89j2wDY3mlS/wx FvHk8yCVj+VYIQSt+IwVrm0VnCz09SHus+F7QpDCtn0bPIzDT+K5kwUg6cnCIkY1VOMH 97dX+cVLAMHx/6gRUewjaflWeYX++hO2+QEGMn2rXsKqWiltX77adLjzFL/QhUylIYvo MahA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726122042; x=1726726842; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=4MH+VWCTNjiA22bJ+vIa1h0/NxuAZxX6cpAlaipl1hg=; b=cXbqbtt3XPg8JuQZzMq/bJaQE5ZrP3a5fWYJorZOJuy0w74L5Z8XDb8altZoSTClPF qNnTuEBO/xF0Wdj3M5kWFTMeL0C8qIBl0QQN8maHfon/KWMFdb7mXMTjw5cd6hx+Sp4g cKsUhl2KAivZZp34FpSKAqCUSly1zirgd+2J92YY+iQC2jZGI6aJ8aC2PfGQ4GQTL9rP PX5dR5aCt9uHq6oDOuTEtypOo+YxHVjpA3p5ZcfMQ+xzkK/MyOAVwKUEhT7axBrRuJj8 iRPjg/Kc36lmO8peVUrbJtb5SwgUmSPyljfFOb1Ei+8BSvLLdK9hLWze9shtI51uB8y/ io/w== X-Forwarded-Encrypted: i=1; AJvYcCUgo9E+5a7wj7CxyYHshfxSfY2ltagWKpaW2d5T8emsFsqtHgo85YRaNehIz7EPqm0Lb3I5ajis3TSumQ==@vger.kernel.org X-Gm-Message-State: AOJu0YxsZ5AqYYKgSXhmsdwsFVnNOl2VFVUILW3Z68s7gJPZPnkDZhtA 1LsF9ARWNVFBj6UZr7YALGaOYpfdXW97fcgSolN9AQAq1sg8YPKSC/XvcYtiCHs= X-Google-Smtp-Source: AGHT+IEU0tdlu4WO+IdyYZyQDbQui3iM6ZAtkm5A4CWh7CFo7CMKirqsrpvUAjbSGnQEOy1Vcb5RUw== X-Received: by 2002:a17:903:191:b0:206:aa2e:6d1f with SMTP id d9443c01a7336-2076e423272mr22083755ad.46.1726122041553; Wed, 11 Sep 2024 23:20:41 -0700 (PDT) Received: from ghost ([2601:647:6700:64d0:7acc:9910:2c1d:4e65]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2076afdd82asm8286105ad.129.2024.09.11.23.20.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Sep 2024 23:20:40 -0700 (PDT) Date: Wed, 11 Sep 2024 23:20:35 -0700 From: Charlie Jenkins To: Michael Ellerman Cc: Geert Uytterhoeven , Christophe Leroy , Arnd Bergmann , Richard Henderson , Ivan Kokshaysky , Matt Turner , Vineet Gupta , Russell King , Guo Ren , Huacai Chen , WANG Xuerui , Thomas Bogendoerfer , "James E.J. Bottomley" , Helge Deller , Nicholas Piggin , Naveen N Rao , Alexander Gordeev , Gerald Schaefer , Heiko Carstens , Vasily Gorbik , Christian Borntraeger , Sven Schnelle , Yoshinori Sato , Rich Felker , John Paul Adrian Glaubitz , "David S. Miller" , Andreas Larsson , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Andy Lutomirski , Peter Zijlstra , Muchun Song , Andrew Morton , "Liam R. Howlett" , Vlastimil Babka , Lorenzo Stoakes , Shuah Khan , Christoph Hellwig , Michal Hocko , "Kirill A. Shutemov" , Chris Torek , linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, linux-alpha@vger.kernel.org, linux-snps-arc@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-csky@vger.kernel.org, loongarch@lists.linux.dev, linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, linux-mm@kvack.org, linux-kselftest@vger.kernel.org, linux-abi-devel@lists.sourceforge.net Subject: Re: [PATCH RFC v3 1/2] mm: Add personality flag to limit address to 47 bits Message-ID: References: <20240905-patches-below_hint_mmap-v3-0-3cd5564efbbb@rivosinc.com> <20240905-patches-below_hint_mmap-v3-1-3cd5564efbbb@rivosinc.com> <87zfol468z.fsf@mail.lhotse> <1aca8e4c-1c12-4624-a689-147ff60b75d6@csgroup.eu> <8734m6s428.fsf@mail.lhotse> Precedence: bulk X-Mailing-List: linux-alpha@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <8734m6s428.fsf@mail.lhotse> On Wed, Sep 11, 2024 at 11:38:55PM +1000, Michael Ellerman wrote: > Geert Uytterhoeven writes: > > Hi Christophe, > > > > On Tue, Sep 10, 2024 at 11:21 AM Christophe Leroy > > wrote: > >> >>> diff --git a/include/uapi/linux/personality.h b/include/uapi/linux/personality.h > >> >>> index 49796b7756af..cd3b8c154d9b 100644 > >> >>> --- a/include/uapi/linux/personality.h > >> >>> +++ b/include/uapi/linux/personality.h > >> >>> @@ -22,6 +22,7 @@ enum { > >> >>> WHOLE_SECONDS = 0x2000000, > >> >>> STICKY_TIMEOUTS = 0x4000000, > >> >>> ADDR_LIMIT_3GB = 0x8000000, > >> >>> + ADDR_LIMIT_47BIT = 0x10000000, > >> >>> }; > >> >> > >> >> I wonder if ADDR_LIMIT_128T would be clearer? > >> >> > >> > > >> > I don't follow, what does 128T represent? > >> > >> 128T is 128 Terabytes, that's the maximum size achievable with a 47BIT > >> address, that naming would be more consistant with the ADDR_LIMIT_3GB > >> just above that means a 3 Gigabytes limit. > > > > Hence ADDR_LIMIT_128TB? > > Yes it should be 128TB. Typo by me. > > cheers 47BIT was selected because the usecase for this flag is for applications that want to store data in the upper bits of a virtual address space. In this case, how large the virtual address space is irrelevant, and only the number of bits that are being used, and hence the number of bits that are free. - Charlie