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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9E826C433EF for ; Wed, 8 Jun 2022 00:43:40 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id F2CAB6B0073; Tue, 7 Jun 2022 20:43:39 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id EDAB36B0074; Tue, 7 Jun 2022 20:43:39 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D7B7C6B0075; Tue, 7 Jun 2022 20:43:39 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id C628E6B0073 for ; Tue, 7 Jun 2022 20:43:39 -0400 (EDT) Received: from smtpin21.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 981EEF66 for ; Wed, 8 Jun 2022 00:43:39 +0000 (UTC) X-FDA: 79553220558.21.F155343 Received: from mail-lf1-f47.google.com (mail-lf1-f47.google.com [209.85.167.47]) by imf23.hostedemail.com (Postfix) with ESMTP id 03D5F140037 for ; Wed, 8 Jun 2022 00:43:34 +0000 (UTC) Received: by mail-lf1-f47.google.com with SMTP id a29so2307661lfk.2 for ; Tue, 07 Jun 2022 17:43:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=INd0ecwrUcQdpKmzJM7LeLbmS03z13BGxEADgiiXx/k=; b=Lw/MpABaN/NwAb1dYgcragPwgz2WubmRL2GZ5y9ppJ+W+WjCpvqPhczOO9hYbRkUAA cRZ8YyNt/oMcU+/XttYGh07qQb9foQm/FAAfpwKz0E2BasahiMx/RbFISpWamqD8Q9Sr goVO6/syqovsuP57Iyc07QFKIi+TtMnfIEQRSi37mToDSd5r/65otlsOID6R1z2Huwod 3KygRLXWV4vELe1WF7WCtn+vsC1gH54sTXsyx5fVGlnj5MScT9sEEtcjf+GuZxQXl17s inEsMlnFFJJyg9Y/hvQGgpOAXj499JHeRD5iFsKJD/h6HIShStFlDBEJEqEeBWhQcI3y gmBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=INd0ecwrUcQdpKmzJM7LeLbmS03z13BGxEADgiiXx/k=; b=xsKxKdsldj2LYUmzZ0ErgJSRD1+3PefVogw/ucGiuPt1l+CcX5yrbjaAwl5tL/7AuS RZwzV0z0hYpF5hLwrWTSovWZQrBrwrXtqFghE7I72oQyO0RwwxiKM31i5O/4/gDwSfdY EuBonlMeAQCOR2QyuOVsZ5AKzhHzyWqIgHOtusNEk2HOzXaLldUrdD4iiCnGE7GNKw4H eaDnoL3j2rdIwf9NGkRVpaECp3eWm6oiVX1cHkMZaW5KeiF0TP9QWCiwOAE4grgRmnhi dcFeQA0d57Qc3MAdzCUOH9XDZbqwLxZx5V10yULw3fmvW9QC7mzjJaonYtT8x0iWA3ME I9/w== X-Gm-Message-State: AOAM531Ww8Mkh5Vy+sMEwe3M5dFrEqtoDyrLhp1SbXt+k+dux8FXOLZc WLTttjhH68p41FPvTUpjysr8wtHyXXscIvFTp4qDTg== X-Google-Smtp-Source: ABdhPJwBqngoTtRt0qScv5OClOehGAyIKY6g8CdbnMpGe2e5wCDjBI2oY0FYgOaKlQdM509tbIvgoDb2wc5IFPIo8h8= X-Received: by 2002:a05:6512:249:b0:479:a3c:de with SMTP id b9-20020a056512024900b004790a3c00demr20676798lfo.128.1654649013297; Tue, 07 Jun 2022 17:43:33 -0700 (PDT) MIME-Version: 1.0 References: <20220604004004.954674-4-zokeefe@google.com> <202206060911.I8rRqGwC-lkp@intel.com> <20220606152333.6f06f2e23a1161e444fa0f8d@linux-foundation.org> In-Reply-To: From: "Zach O'Keefe" Date: Tue, 7 Jun 2022 17:42:56 -0700 Message-ID: Subject: Re: [PATCH v6 03/15] mm/khugepaged: add struct collapse_control To: Yang Shi Cc: Andrew Morton , kernel test robot , Alex Shi , David Hildenbrand , David Rientjes , Matthew Wilcox , Michal Hocko , Pasha Tatashin , Peter Xu , Rongwei Wang , SeongJae Park , Song Liu , Vlastimil Babka , Zi Yan , Linux MM , kbuild-all@lists.01.org, Andrea Arcangeli , Arnd Bergmann , Axel Rasmussen , Chris Kennelly , Chris Zankel , Helge Deller , Hugh Dickins , Ivan Kokshaysky , "James E.J. Bottomley" , Jens Axboe , "Kirill A. Shutemov" , Matt Turner , Max Filippov , Miaohe Lin Content-Type: text/plain; charset="UTF-8" X-Stat-Signature: j66guewza1bmprib1aikfx8w9dcxgz1a X-Rspam-User: Authentication-Results: imf23.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b="Lw/MpABa"; spf=pass (imf23.hostedemail.com: domain of zokeefe@google.com designates 209.85.167.47 as permitted sender) smtp.mailfrom=zokeefe@google.com; dmarc=pass (policy=reject) header.from=google.com X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 03D5F140037 X-HE-Tag: 1654649014-761105 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Mon, Jun 6, 2022 at 4:54 PM Yang Shi wrote: > > On Mon, Jun 6, 2022 at 3:23 PM Andrew Morton wrote: > > > > On Mon, 6 Jun 2022 09:40:20 -0700 "Zach O'Keefe" wrote: > > > > > On Sun, Jun 5, 2022 at 7:42 PM kernel test robot wrote: > > > > > > > > Hi Zach, > > > > > > > > Thank you for the patch! Perhaps something to improve: > > > > > > > > [auto build test WARNING on akpm-mm/mm-everything] > > > > > > > > url: https://github.com/intel-lab-lkp/linux/commits/Zach-O-Keefe/mm-userspace-hugepage-collapse/20220606-012953 > > > > base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything > > > > config: x86_64-rhel-8.3 (https://download.01.org/0day-ci/archive/20220606/202206060911.I8rRqGwC-lkp@intel.com/config) > > > > compiler: gcc-11 (Debian 11.3.0-1) 11.3.0 > > > > reproduce (this is a W=1 build): > > > > # https://github.com/intel-lab-lkp/linux/commit/d87b6065d6050b89930cca0814921aca7c269286 > > > > git remote add linux-review https://github.com/intel-lab-lkp/linux > > > > git fetch --no-tags linux-review Zach-O-Keefe/mm-userspace-hugepage-collapse/20220606-012953 > > > > git checkout d87b6065d6050b89930cca0814921aca7c269286 > > > > # save the config file > > > > mkdir build_dir && cp config build_dir/.config > > > > make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash > > > > > > > > If you fix the issue, kindly add following tag where applicable > > > > Reported-by: kernel test robot > > > > > > > > All warnings (new ones prefixed by >>): > > > > > > > > mm/khugepaged.c: In function 'khugepaged': > > > > >> mm/khugepaged.c:2284:1: warning: the frame size of 4160 bytes is larger than 2048 bytes [-Wframe-larger-than=] > > > > 2284 | } > > > > | ^ > > > > > > Thanks lkp@intel.com. > > > > > > This is due to config with: > > > > > > CONFIG_FRAME_WARN=2048 > > > CONFIG_NODES_SHIFT=10 > > > > > > Where struct collapse_control has a member int > > > node_load[MAX_NUMNODES], and we stack allocate one. > > > > > > Is this a configuration that needs to be supported? 1024 nodes seems > > > like a lot and I'm not sure if these configs are randomly generated or > > > are reminiscent of real systems. > > > > Adding 4k to the stack isn't a good thing to do. It's trivial to > > kmalloc the thing, so why not do that? > > Thanks, Andrew. Yeah, I just suggested that too. Thanks Yang / Andrew for taking the time to voice your suggestions. I'll go ahead and just kmalloc() the thing and fail if we can't. Yang, is there a reason to kmalloc() the entire struct collapse_control with trailing flex array vs stack allocating the struct collapse_control + kmalloc()'ing the node_load array? > > > > I'll await some reviewer input (hopefully positive ;)) before merging > > this series.