From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1032039AbdAEAGU (ORCPT ); Wed, 4 Jan 2017 19:06:20 -0500 Received: from aserp1040.oracle.com ([141.146.126.69]:25508 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934659AbdAEAGQ (ORCPT ); Wed, 4 Jan 2017 19:06:16 -0500 Subject: Re: [RFC PATCH v3] sparc64: Add support for Application Data Integrity (ADI) To: Dave Hansen , Khalid Aziz , davem@davemloft.net, corbet@lwn.net, arnd@arndb.de, akpm@linux-foundation.org References: <1483569999-13543-1-git-send-email-khalid.aziz@oracle.com> <6fcaab9f-40fb-fdfb-2c7e-bf21a862ab7c@linux.intel.com> <8612e7db-97c5-f757-0aae-24c3acedbc29@oracle.com> <2c0502d0-20ef-44ac-db5b-7f651a70b978@linux.intel.com> Cc: 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, mhocko@suse.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: Rob Gardner Message-ID: <5a0270ea-b29a-0751-a27f-2412a8588561@oracle.com> Date: Wed, 4 Jan 2017 16:05:23 -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; format=flowed Content-Transfer-Encoding: 7bit X-Source-IP: userv0021.oracle.com [156.151.31.71] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/04/2017 04:01 PM, Dave Hansen wrote: > On 01/04/2017 03:58 PM, Khalid Aziz wrote: >>> How does this all work with large pages? >> It works with large pages the same way as normal sized pages. The TTE >> for a large page also will have the mcd bit set in it and tags are set >> and referenced the same way. > But does the user setting the tags need to know what the page size is? > > What if two different small pages have different tags and khugepaged > comes along and tries to collapse them? Will the page be split if a > user attempts to set two different tags inside two different small-page > portions of a single THP? The MCD tags operate at a resolution of cache lines (64 bytes). Page sizes don't matter except that each virtual page must have a bit set in its TTE to allow MCD to be enabled on the page. Any page can have many different tags, one for each cache line. Rob