Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp3774439pxy; Mon, 26 Apr 2021 09:24:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyk+FtlH1O5qMRJYwAGVM9YViLD0kkK2lfs1hLKUXgSnJQ079iQxANy/XtJWqGReqGf1nPP X-Received: by 2002:a17:906:4153:: with SMTP id l19mr19238544ejk.109.1619454298176; Mon, 26 Apr 2021 09:24:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619454298; cv=none; d=google.com; s=arc-20160816; b=jX0mDLeKH06IRlJ+1xJ+6Xum4j4ex1o6moH/ziG9sN3w3xcDgWeytzzgVtmwEowjeP uQEpbZlIPDRupg/vZa09nLLW/jVCyTCL3zgOzaW+4/aQv75swS2JxVjCMRPXomSOxa5T OnW0NpNbQdR10HGYqHbEjCZeIDPkP5u80BLVQvIxoo+uhZ+mEER/FM28JDI3IiJsRFA4 wdw+vqWaUyHEpcZxhF/O3DNFDYQQRYZqjf0nT9IknSad9veOWxBoPWKFtXCqNNZZRwAN 6cp9fiHVnFoK+5F6QJMlPH5Ya6ihtruOgaRhg3Q6hEIO6Bxj4y1/FQesfOMF18/M1b/7 SKcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=G1oXQ0k3C+TJ3+pK/S1RsiGeYgBqWj1N5rB2o3PFlsA=; b=iRm/vlY/iFgs6iptv0SObF/4ueF4gdmTxnReWGwIR7gNy+ZWf94PpPPTPfHiV3vdYe LaBH9pLagdfp7fDVp4QdLukxHz8ZkCqsxJ74NluqQZVxFQ7i3FPfHFBVgYQLgrFSg/Bo miQXKAL9lNcibmUwJeSc0iDVygsbxDkiVxLwFOBvGRfIGIJXF9nRBHe3oZ6NW6s7N7Yg r4bIbDYd6gFg3h7FTeAW0I5zxUyjfbguIAMTa0tNVhhLlxYgbD2JS+bOotTqcCm9gAgu usX9dHi7Lf/1qwVzCc5xds9rTUFGAJHKJnAIXqABYOA1uWfLWHHQi4ZJ0wzjHihej5mm 09Og== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=BUxoyU4C; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bj22si14252314ejb.729.2021.04.26.09.24.34; Mon, 26 Apr 2021 09:24:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=BUxoyU4C; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234519AbhDZQXo (ORCPT + 99 others); Mon, 26 Apr 2021 12:23:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44176 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233919AbhDZQXm (ORCPT ); Mon, 26 Apr 2021 12:23:42 -0400 Received: from mail-lf1-x131.google.com (mail-lf1-x131.google.com [IPv6:2a00:1450:4864:20::131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5338DC061574 for ; Mon, 26 Apr 2021 09:23:00 -0700 (PDT) Received: by mail-lf1-x131.google.com with SMTP id r128so62179232lff.4 for ; Mon, 26 Apr 2021 09:23:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=G1oXQ0k3C+TJ3+pK/S1RsiGeYgBqWj1N5rB2o3PFlsA=; b=BUxoyU4CiG9iUane0XR67GRpWWSdf87lIDjVSy1iIQhILWMI3zn4M9c/PriB5DLhe+ xCBtdkuK5mCMtR/TxvOM1X58GqWMn7eIjzEvaRMSdJM2B2pVV/j/QBqA/s81v/XH2oh7 wa9+RZi580kYMAhvqA+0g0+Gqy/mPDEpEA8DKQvPtgQHIHgBLOWNGb0SHSco3ZpL7RDF vZchyLvdNZxR3U+K1AHKxglHyrOtrfmpgU4FCaSnFOVrQIkSJoiLWOtUoZha4RuESPYI rUud5LZCVHgWyhQmNsjfHZUIOpPaegPtpUAYlUH+GdSOqCfMHiF5p93zVD6bCkB1Izeu tQXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=G1oXQ0k3C+TJ3+pK/S1RsiGeYgBqWj1N5rB2o3PFlsA=; b=OnyXJBSjZPnlSqH3XvJ5w5L/YT7eOY6MT5TTx9Ww851q14TaoFX39SZI16bdHIZmVo /v21AHt1npH5ku/FE36CwVMSj4Wqfohav0shGR5EQG9QRRBpb66evBqVbEhxueWdz8CU wyvjk2ce0mjqkkzXWTH3IF01ekOC0Q67aLe4/MdrahcOoImmn7h4+i8CmXRWpFiWSOaT dv4Fud42CCWC0WCQO4lM7TWNd+dfcp/FRNEwov4psKDHDwIENWQpoPMZ8osluHGdfdu6 wM/E8eRclwfAx5fihLjQHPPgPp4aqCbSb5sWtPepMCahYSBlfdzzMfx5JFWozDCV/8/Z rRRg== X-Gm-Message-State: AOAM5328C70N9Qry4dUmkYwJ/+wjPNNXHHYnlmGdfFEuaGXe42Wdg1VC G723sdK7M9x7SLQEJxJ+9Fy7dsjCZ5ctwSXa3zoSOA== X-Received: by 2002:a05:6512:3994:: with SMTP id j20mr13410814lfu.549.1619454172306; Mon, 26 Apr 2021 09:22:52 -0700 (PDT) MIME-Version: 1.0 References: <722774d8-d46b-f8a6-a88e-3c56b4968622@virtuozzo.com> In-Reply-To: <722774d8-d46b-f8a6-a88e-3c56b4968622@virtuozzo.com> From: Shakeel Butt Date: Mon, 26 Apr 2021 09:22:41 -0700 Message-ID: Subject: Re: [PATCH 1/2] ipc sem: use kvmalloc for sem_undo allocation To: Vasily Averin Cc: Michal Hocko , Cgroups , LKML , Alexey Dobriyan , Johannes Weiner , Vladimir Davydov , Andrew Morton , Dmitry Safonov <0x7f454c46@gmail.com> Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 26, 2021 at 3:18 AM Vasily Averin wrote: > > size of sem_undo can exceed one page and with the maximum possible > nsems = 32000 it can grow up to 64Kb. Let's switch its allocation > to kvmalloc to avoid user-triggered disruptive actions like OOM killer > in case of high-order memory shortage. > > Signed-off-by: Vasily Averin Reviewed-by: Shakeel Butt