lkml.org 
[lkml]   [2020]   [Apr]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe:Re:Re: [PATCH] kmalloc index optimization(add kmalloc max size check)
From
Date

发件人:Christopher Lameter <cl@linux.com>
发送日期:2020-04-20 00:42:55
收件人:"赵军奎" <bernard@vivo.com>
抄送人:Pekka Enberg <penberg@kernel.org>,David Rientjes <rientjes@google.com>,Joonsoo Kim <iamjoonsoo.kim@lge.com>,Andrew Morton <akpm@linux-foundation.org>,linux-mm@kvack.org,linux-kernel@vger.kernel.org,kernel@vivo.com
主题:Re:Re: [PATCH] kmalloc_index optimization(add kmalloc max size check)>On Sat, 18 Apr 2020, 赵军奎 wrote:
>
>> Sorry for the misunderstanding.
>
>What misunderstanding?
There is no gap now.
>
>> But the current code is not, kmalloc_index will only be BUG() when it exceeds 64M.
>
>Yes that is what you may want to fix as I said.

>You could modify that to check for KMALLOC_MAX_SIZE with some more
>conditionals but then kmalloc_index) is written so that the compiler gets
>constant folding right.
For this point, I am afraid i didn`t catch your idea.
I am not sure how to modify it....
Is there some similar code implementation in the kernel?

BR//bernard



\
 
 \ /
  Last update: 2020-04-21 05:06    [W:0.052 / U:0.156 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site