From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966701AbdAFQZl (ORCPT ); Fri, 6 Jan 2017 11:25:41 -0500 Received: from mx1.redhat.com ([209.132.183.28]:53402 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751017AbdAFQZb (ORCPT ); Fri, 6 Jan 2017 11:25:31 -0500 Date: Fri, 06 Jan 2017 11:25:25 -0500 (EST) Message-Id: <20170106.112525.2194459503197293118.davem@redhat.com> To: khalid.aziz@oracle.com Cc: dave.hansen@linux.intel.com, mhocko@kernel.org, rob.gardner@oracle.com, corbet@lwn.net, arnd@arndb.de, akpm@linux-foundation.org, hpa@zytor.com, viro@zeniv.linux.org.uk, nitin.m.gupta@oracle.com, chris.hyser@oracle.com, tushar.n.dave@oracle.com, sowmini.varadhan@oracle.com, mike.kravetz@oracle.com, adam.buchbinder@gmail.com, minchan@kernel.org, hughd@google.com, kirill.shutemov@linux.intel.com, keescook@chromium.org, allen.pais@oracle.com, aryabinin@virtuozzo.com, atish.patra@oracle.com, joe@perches.com, pmladek@suse.com, jslaby@suse.cz, cmetcalf@mellanox.com, paul.gortmaker@windriver.com, jmarchan@redhat.com, lstoakes@gmail.com, 0x7f454c46@gmail.com, vbabka@suse.cz, tglx@linutronix.de, mingo@redhat.com, dan.j.williams@intel.com, iamjoonsoo.kim@lge.com, mgorman@techsingularity.net, vdavydov.dev@gmail.com, hannes@cmpxchg.org, namit@vmware.com, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, sparclinux@vger.kernel.org, linux-arch@vger.kernel.org, x86@kernel.org, linux-mm@kvack.org, khalid@gonehiking.org Subject: Re: [RFC PATCH v3] sparc64: Add support for Application Data Integrity (ADI) From: David Miller In-Reply-To: References: Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Fri, 06 Jan 2017 16:25:32 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Khalid Aziz Date: Fri, 6 Jan 2017 09:22:13 -0700 > On 01/06/2017 08:36 AM, Dave Hansen wrote: >> On 01/06/2017 07:32 AM, Khalid Aziz wrote: >>> I agree with you on simplicity first. Subpage granularity is complex, >>> but the architecture allows for subpage granularity. Maybe the right >>> approach is to support this at page granularity first for swappable >>> pages and then expand to subpage granularity in a subsequent patch? >>> Pages locked in memory can already use subpage granularity with my >>> patch. >> >> What do you mean by "locked in memory"? mlock()'d memory can still be >> migrated around and still requires "swap" ptes, for instance. > > You are right. Page migration can invalidate subpage granularity even > for locked pages. Is it possible to use cpusets to keep a task and its > memory locked on a single node? Just wondering if there are limited > cases where subpage granularity could work without supporting subpage > granularity for tags in swap. It still sounds like the right thing to > do is to get a reliable implementation in place with page size > granularity and then add the complexity of subpage granularity. It sounds to me, in all of this, that if the kernel manages the movement of the pages, it thus must handle making sure the tags move around with that page as well.