From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S967817AbdAFQzP (ORCPT ); Fri, 6 Jan 2017 11:55:15 -0500 Received: from mga05.intel.com ([192.55.52.43]:23397 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S937085AbdAFQzF (ORCPT ); Fri, 6 Jan 2017 11:55:05 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,325,1477983600"; d="scan'208";a="27045016" Subject: Re: [RFC PATCH v3] sparc64: Add support for Application Data Integrity (ADI) To: Khalid Aziz , Michal Hocko References: <8612e7db-97c5-f757-0aae-24c3acedbc29@oracle.com> <2c0502d0-20ef-44ac-db5b-7f651a70b978@linux.intel.com> <5a0270ea-b29a-0751-a27f-2412a8588561@oracle.com> <7532a1d6-6562-b10b-dacd-931cb2a9e536@linux.intel.com> <92d55a69-b400-8461-53a1-d505de089700@oracle.com> <75c31c99-cff7-72dc-f593-012fe5acd405@linux.intel.com> <7fbc4ca1-22ef-8ef5-5c1b-dd075852e512@oracle.com> <20170106091934.GF5556@dhcp22.suse.cz> Cc: Rob Gardner , davem@davemloft.net, 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 Aziz From: Dave Hansen Message-ID: Date: Fri, 6 Jan 2017 08:55:03 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/06/2017 08:22 AM, Khalid Aziz wrote: > 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? It's going to be hard to impossible to guarantee. mlock() doesn't guarantee that things won't change physical addresses. You'd have to change that guarantee or chase all the things in the kernel that might change physical addresses (compaction, ksm, etc...). Actually, that reminds me... How does your code interface with ksm? Or is there no interaction needed since you're always working on virtual addresses?