Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp329114ybi; Tue, 16 Jul 2019 21:23:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqzpyxHUARFeeoW5wDn8P0Yu5JN6xXXJYZyJE68Wjm6bt4cuYrJoeTTd3b+HOyHAR35hhNwq X-Received: by 2002:a17:90a:3724:: with SMTP id u33mr40914365pjb.19.1563337415858; Tue, 16 Jul 2019 21:23:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563337415; cv=none; d=google.com; s=arc-20160816; b=eZgYTBFhVc+4I/GLuRlFEgyAPL+x+QjDmURj53FJAyC1CsPp2bsk0ENuc8x1a6+pR4 0D3oOkNgRdaJUhanhLQsXAENQZ8gaz9E6vlpc6RsSyYO9m1yVLtncibiYXP58OINfYmq xSRv2z5A4B2UT0ODSTzgjjYDr4xlWVbI8p99RqfhgkaMEmQtUm3Mgje7aaX3EZnEi0Ip kRrCIOlCvanjaMI08xV3G+2eiuYhxtU+ibc/2rwN6wKyDinp2e8Pkc7xbjsGI5/Smdl4 31AkuUs3dXTBOASlfTZGtzIRj3q/66xOJY7sB3hPI6kije+wKxMQKDeKZFs3/8WmNoZd V5cA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=8jmZySa/x1ljWQ8ESLAWCccSfpJweuM8dsExuQm64fo=; b=kGZa84updf21ljI+YBE84ZZGB0Ah2t1cM+jzyjWNaDVbLGaLEiwQFL4SCefSGmjGmF ZqLVcK29UDsuA9HIlnU6QlbAK2We0pDez2Sy1GANAldHBuquj53dZtnVkguA7sRRSuxD 5ObFKyKs1ophMk7hdo6SbC2BSig4sL5Zju7quC7NthEjXDDjaYzTgRUitfFljqE4PdUJ xN/+mHkIUw0Xs08HydrOGTVODPYxQwAw3i/NbMQaQ9UHTygA6kiI2LiL8S7lz380vOiT PSZxU4yqD8IrLsw837kyH18ifmfUMFLBbeewj1DocNghdAf+4dwmyxlFbaQyFwlnHFP0 NXUA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k63si21736461pgk.39.2019.07.16.21.23.05; Tue, 16 Jul 2019 21:23:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725907AbfGQEWg (ORCPT + 99 others); Wed, 17 Jul 2019 00:22:36 -0400 Received: from verein.lst.de ([213.95.11.211]:46934 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725856AbfGQEWg (ORCPT ); Wed, 17 Jul 2019 00:22:36 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id 6DB4E68B05; Wed, 17 Jul 2019 06:22:33 +0200 (CEST) Date: Wed, 17 Jul 2019 06:22:33 +0200 From: Christoph Hellwig To: John Hubbard Cc: Ralph Campbell , linux-mm@kvack.org, linux-kernel@vger.kernel.org, willy@infradead.org, Vlastimil Babka , Christoph Lameter , Dave Hansen , =?iso-8859-1?B?Suly9G1l?= Glisse , "Kirill A . Shutemov" , Lai Jiangshan , Martin Schwidefsky , Pekka Enberg , Randy Dunlap , Andrey Ryabinin , Christoph Hellwig , Jason Gunthorpe , Andrew Morton , Linus Torvalds Subject: Re: [PATCH 1/3] mm: document zone device struct page reserved fields Message-ID: <20190717042233.GA4529@lst.de> References: <20190717001446.12351-1-rcampbell@nvidia.com> <20190717001446.12351-2-rcampbell@nvidia.com> <26a47482-c736-22c4-c21b-eb5f82186363@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <26a47482-c736-22c4-c21b-eb5f82186363@nvidia.com> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 16, 2019 at 06:20:23PM -0700, John Hubbard wrote: > > - unsigned long _zd_pad_1; /* uses mapping */ > > + /* > > + * The following fields are used to hold the source > > + * page anonymous mapping information while it is > > + * migrated to device memory. See migrate_page(). > > + */ > > + unsigned long _zd_pad_1; /* aliases mapping */ > > + unsigned long _zd_pad_2; /* aliases index */ > > + unsigned long _zd_pad_3; /* aliases private */ > > Actually, I do think this helps. It's hard to document these fields, and > the ZONE_DEVICE pages have a really complicated situation during migration > to a device. > > Additionally, I'm not sure, but should we go even further, and do this on the > other side of the alias: The _zd_pad_* field obviously are NOT used anywhere in the source tree. So these comments are very misleading. If we still keep using ->mapping, ->index and ->private we really should clean up the definition of struct page to make that obvious instead of trying to doctor around it using comments.