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 X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 41766C433ED for ; Wed, 28 Apr 2021 06:33:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 07B356141F for ; Wed, 28 Apr 2021 06:33:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235869AbhD1Ge0 (ORCPT ); Wed, 28 Apr 2021 02:34:26 -0400 Received: from mx2.suse.de ([195.135.220.15]:51226 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229643AbhD1GeY (ORCPT ); Wed, 28 Apr 2021 02:34:24 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de 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= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 803C9B05C; Wed, 28 Apr 2021 06:33:39 +0000 (UTC) Date: Wed, 28 Apr 2021 08:33:38 +0200 From: Michal Hocko To: Vasily Averin Cc: cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, Alexey Dobriyan , Shakeel Butt , Johannes Weiner , Vladimir Davydov , Andrew Morton , Dmitry Safonov <0x7f454c46@gmail.com> Subject: Re: [PATCH 2/2] ipc: use kmalloc for msg_queue and shmid_kernel Message-ID: References: <70805e05-5e56-2ab9-2654-3d48e9fe5a0a@virtuozzo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <70805e05-5e56-2ab9-2654-3d48e9fe5a0a@virtuozzo.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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