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=-7.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 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 06D40C433DB for ; Thu, 14 Jan 2021 19:00:31 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 83DE623B55 for ; Thu, 14 Jan 2021 19:00:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 83DE623B55 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id D23E38D010B; Thu, 14 Jan 2021 14:00:29 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id CD4448D00F0; Thu, 14 Jan 2021 14:00:29 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BEBEA8D010B; Thu, 14 Jan 2021 14:00:29 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0178.hostedemail.com [216.40.44.178]) by kanga.kvack.org (Postfix) with ESMTP id A955C8D00F0 for ; Thu, 14 Jan 2021 14:00:29 -0500 (EST) Received: from smtpin27.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 6FC548245571 for ; Thu, 14 Jan 2021 19:00:29 +0000 (UTC) X-FDA: 77705296578.27.laugh79_040d95627529 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin27.hostedemail.com (Postfix) with ESMTP id 4F1553D66B for ; Thu, 14 Jan 2021 19:00:29 +0000 (UTC) X-HE-Tag: laugh79_040d95627529 X-Filterd-Recvd-Size: 2989 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf37.hostedemail.com (Postfix) with ESMTP for ; Thu, 14 Jan 2021 19:00:28 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id BD48023A05; Thu, 14 Jan 2021 19:00:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1610650827; bh=7t82loxEyJ2bTsA9EqHNDMaRiGP+/aM7PE+ab8wFi3Y=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=KVJfEn3qBdkiv78bi7h7P6opC4Z40CkSidAeQv04OpgmsJGT1DefXtedEe/3ApXXq frODFjMe7gyBnqWivoA1VoPLHuoMIHS2AdIA5NhVk396FO2Lahcjb0hjoj6R8w08x0 /0fRNwXorPLfMcYC1JLTgR2gJipADH+l5ni0t9F+vYKH1fLpWh6f6la0iUUwcJgTVV LNlfiTw/CvD01hZAK5b3faqZv2P1oXRgX1l9dWE2SxDuDjH0zDnyv5ySGApykE+zzu MEq6690HQGRwLECS3Am+M0zHKU2fniDxYyJvGTffliyXQSq1Ycslrz93Bj9HO4W9Xz Gbgg16YmpSDXA== Date: Thu, 14 Jan 2021 19:00:22 +0000 From: Will Deacon To: Linus Torvalds Cc: Linux Kernel Mailing List , Linux-MM , Linux ARM , Catalin Marinas , Jan Kara , Minchan Kim , Andrew Morton , "Kirill A . Shutemov" , Vinayak Menon , Hugh Dickins , Android Kernel Team Subject: Re: [RFC PATCH 4/8] mm: Separate fault info out of 'struct vm_fault' Message-ID: <20210114190021.GB13135@willie-the-truck> References: <20210114175934.13070-1-will@kernel.org> <20210114175934.13070-5-will@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) 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 Thu, Jan 14, 2021 at 10:16:13AM -0800, Linus Torvalds wrote: > On Thu, Jan 14, 2021 at 10:01 AM Will Deacon wrote: > > > > Try to clean this up by splitting the immutable fault information out > > into a new 'struct vm_fault_info' which is embedded in 'struct vm_fault' > > and will later be made 'const'. The vast majority of this change was > > performed with a coccinelle patch: > > You may have a reason for doing it this way, but my reaction to this > was: "just make the new embedded struct unnamed". > > Then you wouldn't need to do all the automated coccinelle changes. > > Is there some reason you didn't do that, or just a "oh, I didn't think of > it". I tried that initially, e.g. struct vm_fault { const struct { unsigned long address; ... }; }; but I found that I had to make all of the members const to get it to work, at which point the anonymous struct wasn't really adding anything. Did I just botch the syntax? Will