Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1391953pxf; Fri, 12 Mar 2021 08:29:11 -0800 (PST) X-Google-Smtp-Source: ABdhPJwEAN6teInvDc37v07ZvtHu8uOn5W+z1XnZYm3suX43RYF/MykkrvSzj9NGNcAZRa4cNZsR X-Received: by 2002:a17:906:e2d4:: with SMTP id gr20mr9644058ejb.432.1615566550926; Fri, 12 Mar 2021 08:29:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615566550; cv=none; d=google.com; s=arc-20160816; b=Ym/wY1/3BlWAowJGJIRQjcUBjwtUlj3y4TISy+80jpdrWGAdwqddnFUb9Peq4OXYaS EFhga9XQ67Z2Z9udgpxeJexjlGDz1eDJSeoGtx1M4HYlWL9eManA6t/FvNRO3mou5er2 H6iyfskyBPxHWcsR7H5sBle/W+GWgSE/nOPkUZcgbe7XP+YL8P/ZDSk+SJNCVYxYp4/V 6QwIOmjr4hkd6pdO8yE1QMM/jofnuRxsvC27Od6vpGCN2IzhVpxrypim5AFeiNtMe/h7 K64txD/9sSDqlZlOQ1S9hDdJmijhXGRd7/ahbQ8ztnkqW0Hh6r5aYpkzHPdMMOHRfpMb WJIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=P+g6QUEwT+zmWhsDK/6UdIQ9HqAa27Oa1YJgXzK85iw=; b=VN/idHyX2rUXcdI14tWOD36/uuQM938elHQOpYiEeCGk/LOanEIGq4l+qCdwEP3W5C MRDUeqAMj/7+61GZIJOLHCDm4G2CtXVtIixa0uryEEoYEPavE0vdAbHrvnGYSg1FeC57 rS3elDsk4VynKsxnjucP+UN/cEtd/DnPL7Ahz5J2lEG+2lD8AV5lPNpWuelj+3MVzNDZ lgZbpu1U5/Ut7fZFSk3V6DqrQTOOBITfccxPHKFzzZ9h4rFUFYEMwoTahFch3TeAkbIp /TiBUEmI7kXomM2fQZ5fzIQCImoLPc7FnVpxiYJm6V2pTgI5n5Iw+OkRHOemh8QBg0WB 70kw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gz11si4526791ejc.745.2021.03.12.08.28.48; Fri, 12 Mar 2021 08:29:10 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232647AbhCLQ1o (ORCPT + 99 others); Fri, 12 Mar 2021 11:27:44 -0500 Received: from verein.lst.de ([213.95.11.211]:46215 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232257AbhCLQ1U (ORCPT ); Fri, 12 Mar 2021 11:27:20 -0500 Received: by verein.lst.de (Postfix, from userid 2407) id 01C1168B02; Fri, 12 Mar 2021 17:27:18 +0100 (CET) Date: Fri, 12 Mar 2021 17:27:18 +0100 From: Christoph Hellwig To: Rasmus Villemoes Cc: Greg Kroah-Hartman , "Rafael J. Wysocki" , Christoph Hellwig , linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] devtmpfs: actually reclaim some init memory Message-ID: <20210312162718.GC11243@lst.de> References: <20210312103027.2701413-1-linux@rasmusvillemoes.dk> <20210312103027.2701413-2-linux@rasmusvillemoes.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210312103027.2701413-2-linux@rasmusvillemoes.dk> User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 12, 2021 at 11:30:27AM +0100, Rasmus Villemoes wrote: > Currently gcc seems to inline devtmpfs_setup() into devtmpfsd(), so > its memory footprint isn't reclaimed as intended. Mark it noinline to > make sure it gets put in .init.text. > > While here, setup_done can also be put in .init.data: After complete() > releases the internal spinlock, the completion object is never touched > again by that thread, and the waiting thread doesn't proceed until it > observes ->done while holding that spinlock. > > This is now the same pattern as for kthreadd_done in init/main.c: > complete() is done in a __ref function, while the corresponding > wait_for_completion() is in an __init function. I'm not sure if this matters in any way, but it does look fine to me: Reviewed-by: Christoph Hellwig