Received: by 2002:a05:7412:798b:b0:fc:a2b0:25d7 with SMTP id fb11csp107027rdb; Wed, 21 Feb 2024 19:35:57 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXVZ53WFydrH2k5MtkNMCsYEXcyqjAngvvkd0MUYejaDm7OqujHaoNoM7+JSXfEUbZqEdnq+fSbVqsDj9YWetiLr9/1cspg/u1X6KvPDw== X-Google-Smtp-Source: AGHT+IFYErVhQeO1YnmUz6KO8AkcXSu2orAZRznuYXEHEojGA2Zj8HvHCd11ZOozPW2FFj8vKSea X-Received: by 2002:a17:902:c949:b0:1dc:43d:962 with SMTP id i9-20020a170902c94900b001dc043d0962mr9914598pla.42.1708572956865; Wed, 21 Feb 2024 19:35:56 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708572956; cv=pass; d=google.com; s=arc-20160816; b=0snDD4+Z3YJyY5Qe1DM3uS6biU2ApS2zCpNqwxcgB9CSQHTgxprnKem/tTnYfdT5mc wmiezi7Zxu43rmnT+xuwWZe50C2E/yS7VwVW1RAodA90arVGH6581Zl1+M0jgKGOJJ7/ CItTGieSZv1oFNq/KUjoIJjiqRoI7qRNoyPl2srvgBKm94nvPRiFKHQ68VjgiD7/Nh15 D4cWIPKakIKT7bJq8DwXQsf8iHpYwBCJbj0vXDk3jlR4aUQYDObrhzdWl6jeZEgA4a34 Gu0cEs7/pvJcJC0I95eDVemCs6Uc/W89ZsyOkiejhq+UAEOrv1DqMvgO6+WKrEMdhrFb 5OVQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=k2qqGakj6suncR5yFTplOvwhI9MQ07qi3BIxDZ0n86Y=; fh=7LP8t954uHnDkzu77Iidc1+r0eNDQrtruu0dALQ6seI=; b=hQsIbUtw67Oj0SQBAs2nZDp0FI88D1uADRDSPQxXVSyGdfAkrDffkBInrLk0fO9d1d MKls2LTLLohkn2a7RvkMVflyml7/HELH990ZXk97g6ycmL4IIEwtkgWROMgDFSxtzeym KVh4qrchf/1TyCtWk8wlxiaOkAlddLUhKMZpGYs9PNX3j/pv58xZ+zMn72SlC9uz7/cI 4+hKrXeMXnUWU2Ew6hrRj99oQLo7ypyq+o697xlyo1M3Klo/w0hRfX7xU84/APF9yZqI xJXKWk6ATBqXEIwLKOY8X0YmC1AWq9NkCZ4pxyZa3+BlM28yQUWdXD6Hytn9WbjvDb8b 8CdQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=XlZsiqoy; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-75861-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-75861-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id n1-20020a170902f60100b001d9607b682dsi4871282plg.96.2024.02.21.19.35.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Feb 2024 19:35:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-75861-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=XlZsiqoy; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-75861-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-75861-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 4465328323D for ; Thu, 22 Feb 2024 03:35:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EAF541755B; Thu, 22 Feb 2024 03:35:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="XlZsiqoy" Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8CC8428EF for ; Thu, 22 Feb 2024 03:35:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.50.34 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708572950; cv=none; b=W7OM8ft4cYmipLgP7voFuYNPsQ0UUJoDbdKGB47/ftlkowdXVeP41HPPZbblyytJ3hShdYUn/yt05VudFKTonzfPafkBnj3M0T2NIww3jgIy1Or4yDZdSfUvQk0SpODJYZJYDPtF/yLGpROAw+TTC+2kAodlSVHXfnl+eTP29SA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708572950; c=relaxed/simple; bh=HSxScKbzztXZB5YaKXB2CHicE/jR2ReMfL/oei6pYmw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=O5vlxgR16ICBfbgbnVf7XD8hPIBIeF9l3XoS/WpyIonwU916f15yr3aS7ZoM+YRRtY0OudCtty0jyD71zhGq9JV25ZyUrNPalqdcKStfKJUPSDxBw3iaAkBACjH0tX5H0IxCjOQC1cXDg6Yq6ZgyNTV0p4Zzis5GNHD+bhaLoYg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=XlZsiqoy; arc=none smtp.client-ip=90.155.50.34 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=k2qqGakj6suncR5yFTplOvwhI9MQ07qi3BIxDZ0n86Y=; b=XlZsiqoyvBGd+rE9mW8Fd2Bby3 sjmex3EpRfExrk/r+40NGtN49fo3fE9AREhgffMlFj5ghpupNJrD9TIwhHtaW5Pi+FluHzRCSiGF8 d/nVuqN2zQsVN3gKV5scRxFNXrAJjdAROVffaY+raUGFZYd5hS0vRSPCYPKRIDdezxdcD0M2rsFJV /yuJh+E2eKRLAul0dnCigD4O1pZx2dXSGZr//5vg/s5rFjpY+YJLnxXaC6kckkfcxwDyycoUl3isR nfA796cBiFDJaqut3yRrMDtZQBxKtUDwjwWGZPt1yTx1P6QZ/zwhabYErmbHb5SPo5D436ZCDzzTC H/jJ6UPw==; Received: from willy by casper.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1rczs9-00000002TJz-215C; Thu, 22 Feb 2024 03:35:45 +0000 Date: Thu, 22 Feb 2024 03:35:45 +0000 From: Matthew Wilcox To: "Vishal Moola (Oracle)" Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, akpm@linux-foundation.org, muchun.song@linux.dev Subject: Re: [PATCH v2 2/5] hugetlb: Move vm_struct declaration to the top of hugetlb_fault() Message-ID: References: <20240221234732.187629-1-vishal.moola@gmail.com> <20240221234732.187629-3-vishal.moola@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240221234732.187629-3-vishal.moola@gmail.com> On Wed, Feb 21, 2024 at 03:47:29PM -0800, Vishal Moola (Oracle) wrote: > hugetlb_fault() currently defines a vm_struct to pass to the generic s/vm_struct/vm_fault/ (both this line and Subject:) > handle_userfault() function. We can move this definition to the top of > hugetlb_fault() so that it can be used throughout the rest of the > hugetlb fault path. > > This will help cleanup a number of excess variables and function > arguments throughout the stack. Also, since vm_fault already has space > to store the page offset, use that instead and get rid of idx. > > Signed-off-by: Vishal Moola (Oracle) Reviewed-by: Matthew Wilcox (Oracle)