Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp10421878ybi; Wed, 24 Jul 2019 22:56:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqyU4oQd1TG6gW6C7Q3NLkd6T0E+DK5ei3u9K6weHs/u+HFxhf57QVJuJE95xsj9q39FInTR X-Received: by 2002:a65:6216:: with SMTP id d22mr78362101pgv.404.1564034198844; Wed, 24 Jul 2019 22:56:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564034198; cv=none; d=google.com; s=arc-20160816; b=GqEVrEtu/ja+0E73ydVT3xsWPvtBp1j97cTiKh3+IZA1jMBmumkUBbqL+NuPWjs909 lCpad0Eunm16DojxhHNtvIcpShzpdt84/10IIGbnZLEy648LrNkikR4RWRqQsOEfoM6n IwSTpDIK39TmI3uSfloHARCSRjVjj+jQ7rJkiSpgYa6YdakIc7Se2ffLzjgTIHsoxWK9 pIbAgQDF2YksoagNeOvC0PyNb8lfDvyZroMMW5hpW8cPpZs6kUwhcB0Ia6e1uSIQYhUi 4mSjvRo8jQnb1ruqOlvLKLASNakGkifnIPjxjTJmHD0QTwStJohuPhughdgcndszFHG5 RD0w== 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=MnX4sjrjQ4hspDF2bRDdwlwL6iTF8xpxcMxVCrDD4pI=; b=HrC85YAh0Y1cEgMz9i7RkovI0Miwzs4PT9LqEVT5JIjT5rBhHB5cMFJitMjogEsBN1 Srrupu5VE+OVqaNL3wGQYeuMTq+YesZ1QXGaUS8lmMmMJdnV0e7uKmiD3AQbIJxHqpcy ZGzKCrhe0Pmi3X0evH0866egYNq9eorP74QH2PVMchgWgKjIyNYWm4+CMP8ThYDtEUcs zYWK5RQiIC9zz/C1lmyjtDLW71tZcxJfp8kS+xuPDEyPiPOjiYYQj5oUM0w/HcPsqprN b4frOGzim8nFG3MwuAjaAO0QfQAbs+J/kBFOgrhCqMJHu6cPKiF42hO2UcWr+juc3eH0 IyGA== 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 32si14045968plc.152.2019.07.24.22.56.24; Wed, 24 Jul 2019 22:56:38 -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 S2403944AbfGYFiY (ORCPT + 99 others); Thu, 25 Jul 2019 01:38:24 -0400 Received: from verein.lst.de ([213.95.11.211]:58122 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2403937AbfGYFiY (ORCPT ); Thu, 25 Jul 2019 01:38:24 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id B331868B20; Thu, 25 Jul 2019 07:38:21 +0200 (CEST) Date: Thu, 25 Jul 2019 07:38:21 +0200 From: Christoph Hellwig To: Ralph Campbell Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, John Hubbard , Matthew Wilcox , 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 v3 1/3] mm: document zone device struct page field usage Message-ID: <20190725053821.GA24527@lst.de> References: <20190724232700.23327-1-rcampbell@nvidia.com> <20190724232700.23327-2-rcampbell@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190724232700.23327-2-rcampbell@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 Wed, Jul 24, 2019 at 04:26:58PM -0700, Ralph Campbell wrote: > Struct page for ZONE_DEVICE private pages uses the page->mapping and > and page->index fields while the source anonymous pages are migrated to > device private memory. This is so rmap_walk() can find the page when > migrating the ZONE_DEVICE private page back to system memory. > ZONE_DEVICE pmem backed fsdax pages also use the page->mapping and > page->index fields when files are mapped into a process address space. > > Add comments to struct page and remove the unused "_zd_pad_1" field > to make this more clear. I still think we should also fix up the layout, and I haven't seen a reply from Matthew justifying his curses for your patch that makes the struct page layout actually match how it is used.