From: Michal Hocko Subject: Re: [PATCH 2/2] ipc: use kmalloc for msg_queue and shmid_kernel Date: Wed, 28 Apr 2021 08:33:38 +0200 Message-ID: References: <70805e05-5e56-2ab9-2654-3d48e9fe5a0a@virtuozzo.com> Mime-Version: 1.0 Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1619591619; 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=0ZhVc13i/loE89OYYNbTCn+LJbpHgfesQUl3vFUzU4w=; b=hcsbUVWZOVa/VD7u1r+GmF/lDktHCL3s1g+57QapM1T1z/kS/fIVhq2dmbzUoQQ1SkD5P8 jq0XFt5nGtr5WpT2823UcVhheb//TC4a0GNGLkTr+bmBbrLPca+VmxIZWE+D68CsXk/Ul8 PtTpuvnPR6+vo9WXfNBwN9/fguwpXfs= Content-Disposition: inline In-Reply-To: <70805e05-5e56-2ab9-2654-3d48e9fe5a0a-5HdwGun5lf+gSpxsJD1C4w@public.gmane.org> List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Vasily Averin Cc: cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Alexey Dobriyan , Shakeel Butt , Johannes Weiner , Vladimir Davydov , Andrew Morton , Dmitry Safonov <0x7f454c46-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> On Wed 28-04-21 08:15:10, Vasily Averin wrote: > On 4/26/21 1:25 PM, Michal Hocko wrote: > > Using kvmalloc for sub page size objects is suboptimal because kmalloc > > can easily fallback into vmalloc under memory pressure and smaller > > objects would fragment memory. Therefore replace kvmalloc by a simple > > kmalloc. > > I think you're wrong here: > kvmalloc can failback to vmalloc for size > PAGE_SIZE only You are right. My bad. My memory failed on me. Sorry about the confusion. -- Michal Hocko SUSE Labs