From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dave Hansen Subject: Re: [PATCH v12 02/11] mm, swap: Add infrastructure for saving page metadata on swap Date: Mon, 5 Mar 2018 11:35:42 -0800 Message-ID: References: <0d77dc3c-1454-a689-a0fb-f07e8973c29e@linux.intel.com> <4a766f6d-ba96-7963-b367-7214eab7e307@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4a766f6d-ba96-7963-b367-7214eab7e307@oracle.com> Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org To: Khalid Aziz , akpm@linux-foundation.org, davem@davemloft.net, arnd@arndb.de Cc: kirill.shutemov@linux.intel.com, mhocko@suse.com, ross.zwisler@linux.intel.com, dave.jiang@intel.com, mgorman@techsingularity.net, willy@infradead.org, hughd@google.com, minchan@kernel.org, hannes@cmpxchg.org, shli@fb.com, mingo@kernel.org, jglisse@redhat.com, me@tobin.cc, anthony.yznaga@oracle.com, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, sparclinux@vger.kernel.org, Khalid Aziz List-Id: linux-arch.vger.kernel.org On 03/05/2018 11:29 AM, Khalid Aziz wrote: > ADI data is per page data and is held in the spare bits in the RAM. It > is loaded into the cache when data is loaded from RAM and flushed out to > spare bits in the RAM when data is flushed from cache. Sparc allows one > tag for each ADI block size of data and ADI block size is same as > cacheline size. Which does not square with your earlier assertion "ADI data is per page data". It's per-cacheline data. Right? > When a page is loaded into RAM from swap space, all of > the associated ADI data for the page must also be loaded into the RAM, > so it looks like page level data and storing it in page level software > data structure makes sense. I am open to other suggestions though. Do you have a way to tell that data is not being thrown away? Like if the ADI metadata is different for two different cachelines within a single page? From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com ([192.55.52.43]:43308 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751880AbeCETfo (ORCPT ); Mon, 5 Mar 2018 14:35:44 -0500 Subject: Re: [PATCH v12 02/11] mm, swap: Add infrastructure for saving page metadata on swap References: <0d77dc3c-1454-a689-a0fb-f07e8973c29e@linux.intel.com> <4a766f6d-ba96-7963-b367-7214eab7e307@oracle.com> From: Dave Hansen Message-ID: Date: Mon, 5 Mar 2018 11:35:42 -0800 MIME-Version: 1.0 In-Reply-To: <4a766f6d-ba96-7963-b367-7214eab7e307@oracle.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-arch-owner@vger.kernel.org List-ID: To: Khalid Aziz , akpm@linux-foundation.org, davem@davemloft.net, arnd@arndb.de Cc: kirill.shutemov@linux.intel.com, mhocko@suse.com, ross.zwisler@linux.intel.com, dave.jiang@intel.com, mgorman@techsingularity.net, willy@infradead.org, hughd@google.com, minchan@kernel.org, hannes@cmpxchg.org, shli@fb.com, mingo@kernel.org, jglisse@redhat.com, me@tobin.cc, anthony.yznaga@oracle.com, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, sparclinux@vger.kernel.org, Khalid Aziz Message-ID: <20180305193542.X-ldUNW20d6gbpM4qCDm-lrqYJKA1yjqdz9ZVxEKIOA@z> On 03/05/2018 11:29 AM, Khalid Aziz wrote: > ADI data is per page data and is held in the spare bits in the RAM. It > is loaded into the cache when data is loaded from RAM and flushed out to > spare bits in the RAM when data is flushed from cache. Sparc allows one > tag for each ADI block size of data and ADI block size is same as > cacheline size. Which does not square with your earlier assertion "ADI data is per page data". It's per-cacheline data. Right? > When a page is loaded into RAM from swap space, all of > the associated ADI data for the page must also be loaded into the RAM, > so it looks like page level data and storing it in page level software > data structure makes sense. I am open to other suggestions though. Do you have a way to tell that data is not being thrown away? Like if the ADI metadata is different for two different cachelines within a single page?