All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>
To: Jan Kara <jack@suse.cz>
Cc: akpm@linux-foundation.org,
	"Kirill A . Shutemov" <kirill.shutemov@linux.intel.com>,
	mpe@ellerman.id.au, Ross Zwisler <zwisler@kernel.org>,
	"Oliver O'Halloran" <oohall@gmail.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	linuxppc-dev@lists.ozlabs.org,
	Dan Williams <dan.j.williams@intel.com>
Subject: Re: [PATCH 2/2] mm/dax: Don't enable huge dax mapping by default
Date: Thu, 28 Feb 2019 18:02:53 +0530	[thread overview]
Message-ID: <2452a0b6-a90e-52b8-cb9f-0b5a7fafbe64@linux.ibm.com> (raw)
In-Reply-To: <20190228094011.GB22210@quack2.suse.cz>

On 2/28/19 3:10 PM, Jan Kara wrote:
> On Thu 28-02-19 14:05:22, Aneesh Kumar K.V wrote:
>> Add a flag to indicate the ability to do huge page dax mapping. On architecture
>> like ppc64, the hypervisor can disable huge page support in the guest. In
>> such a case, we should not enable huge page dax mapping. This patch adds
>> a flag which the architecture code will update to indicate huge page
>> dax mapping support.
>>
>> Architectures mostly do transparent_hugepage_flag = 0; if they can't
>> do hugepages. That also takes care of disabling dax hugepage mapping
>> with this change.
>>
>> Without this patch we get the below error with kvm on ppc64.
>>
>> [  118.849975] lpar: Failed hash pte insert with error -4
>>
>> NOTE: The patch also use
>>
>> echo never > /sys/kernel/mm/transparent_hugepage/enabled
>> to disable dax huge page mapping.
>>
>> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
> 
> Added Dan to CC for opinion. I kind of fail to see why you don't use
> TRANSPARENT_HUGEPAGE_FLAG for this. I know that technically DAX huge pages
> and normal THPs are different things but so far we've tried to avoid making
> that distinction visible to userspace.


I would also like to use the same flag. Was not sure whether it was ok. 
In fact that is one of the reason I hooked this to 
/sys/kernel/mm/transparent_hugepage/enabled. If we are ok with using 
same flag, we can kill the vma_is_dax() check completely.


-aneesh


WARNING: multiple messages have this Message-ID (diff)
From: "Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>
To: Jan Kara <jack@suse.cz>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	Oliver O'Halloran <oohall@gmail.com>,
	Ross Zwisler <zwisler@kernel.org>,
	akpm@linux-foundation.org, linuxppc-dev@lists.ozlabs.org,
	Dan Williams <dan.j.williams@intel.com>,
	"Kirill A . Shutemov" <kirill.shutemov@linux.intel.com>
Subject: Re: [PATCH 2/2] mm/dax: Don't enable huge dax mapping by default
Date: Thu, 28 Feb 2019 18:02:53 +0530	[thread overview]
Message-ID: <2452a0b6-a90e-52b8-cb9f-0b5a7fafbe64@linux.ibm.com> (raw)
In-Reply-To: <20190228094011.GB22210@quack2.suse.cz>

On 2/28/19 3:10 PM, Jan Kara wrote:
> On Thu 28-02-19 14:05:22, Aneesh Kumar K.V wrote:
>> Add a flag to indicate the ability to do huge page dax mapping. On architecture
>> like ppc64, the hypervisor can disable huge page support in the guest. In
>> such a case, we should not enable huge page dax mapping. This patch adds
>> a flag which the architecture code will update to indicate huge page
>> dax mapping support.
>>
>> Architectures mostly do transparent_hugepage_flag = 0; if they can't
>> do hugepages. That also takes care of disabling dax hugepage mapping
>> with this change.
>>
>> Without this patch we get the below error with kvm on ppc64.
>>
>> [  118.849975] lpar: Failed hash pte insert with error -4
>>
>> NOTE: The patch also use
>>
>> echo never > /sys/kernel/mm/transparent_hugepage/enabled
>> to disable dax huge page mapping.
>>
>> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
> 
> Added Dan to CC for opinion. I kind of fail to see why you don't use
> TRANSPARENT_HUGEPAGE_FLAG for this. I know that technically DAX huge pages
> and normal THPs are different things but so far we've tried to avoid making
> that distinction visible to userspace.


I would also like to use the same flag. Was not sure whether it was ok. 
In fact that is one of the reason I hooked this to 
/sys/kernel/mm/transparent_hugepage/enabled. If we are ok with using 
same flag, we can kill the vma_is_dax() check completely.


-aneesh


  reply	other threads:[~2019-02-28 12:33 UTC|newest]

Thread overview: 72+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-28  8:35 [PATCH 1/2] fs/dax: deposit pagetable even when installing zero page Aneesh Kumar K.V
2019-02-28  8:35 ` Aneesh Kumar K.V
2019-02-28  8:35 ` [PATCH 2/2] mm/dax: Don't enable huge dax mapping by default Aneesh Kumar K.V
2019-02-28  8:35   ` Aneesh Kumar K.V
2019-02-28  9:40   ` Jan Kara
2019-02-28  9:40     ` Jan Kara
2019-02-28 12:32     ` Aneesh Kumar K.V [this message]
2019-02-28 12:32       ` Aneesh Kumar K.V
2019-02-28  9:40   ` Oliver
2019-02-28  9:40     ` Oliver
2019-02-28  9:40     ` Oliver
2019-02-28 12:43     ` Aneesh Kumar K.V
2019-02-28 12:43       ` Aneesh Kumar K.V
2019-02-28 16:45     ` Dan Williams
2019-02-28 16:45       ` Dan Williams
2019-02-28 16:45       ` Dan Williams
2019-03-06  9:17       ` Aneesh Kumar K.V
2019-03-06  9:17         ` Aneesh Kumar K.V
2019-03-06  9:17         ` Aneesh Kumar K.V
2019-03-06 11:44         ` Michal Suchánek
2019-03-06 11:44           ` Michal Suchánek
2019-03-06 11:44           ` Michal Suchánek
2019-03-06 12:45           ` Aneesh Kumar K.V
2019-03-06 12:45             ` Aneesh Kumar K.V
2019-03-06 13:06             ` Kirill A. Shutemov
2019-03-06 13:06               ` Kirill A. Shutemov
2019-03-06 13:06               ` Kirill A. Shutemov
2019-03-13 16:07             ` Dan Williams
2019-03-13 16:07               ` Dan Williams
2019-03-13 16:07               ` Dan Williams
2019-03-19  8:44               ` Kirill A. Shutemov
2019-03-19  8:44                 ` Kirill A. Shutemov
2019-03-19  8:44                 ` Kirill A. Shutemov
2019-03-19 15:36                 ` Dan Williams
2019-03-19 15:36                   ` Dan Williams
2019-03-19 15:36                   ` Dan Williams
2019-03-13 16:02         ` Dan Williams
2019-03-13 16:02           ` Dan Williams
2019-03-13 16:02           ` Dan Williams
2019-03-13 16:02           ` Dan Williams
2019-03-14  3:45           ` Aneesh Kumar K.V
2019-03-14  3:45             ` Aneesh Kumar K.V
2019-03-14  3:45             ` Aneesh Kumar K.V
2019-03-14  4:02             ` Dan Williams
2019-03-14  4:02               ` Dan Williams
2019-03-14  4:02               ` Dan Williams
2019-03-14  4:02               ` Dan Williams
2019-03-20  8:06               ` Aneesh Kumar K.V
2019-03-20  8:06                 ` Aneesh Kumar K.V
2019-03-20  8:06                 ` Aneesh Kumar K.V
2019-03-20  8:09                 ` Aneesh Kumar K.V
2019-03-20  8:09                   ` Aneesh Kumar K.V
2019-03-20 15:34                   ` Dan Williams
2019-03-20 15:34                     ` Dan Williams
2019-03-20 15:34                     ` Dan Williams
2019-03-20 15:34                     ` Dan Williams
2019-03-20 20:57                     ` Dan Williams
2019-03-20 20:57                       ` Dan Williams
2019-03-20 20:57                       ` Dan Williams
2019-03-20 20:57                       ` Dan Williams
2019-03-21  3:08                       ` Oliver
2019-03-21  3:08                         ` Oliver
2019-03-21  3:08                         ` Oliver
2019-03-21  3:08                         ` Oliver
2019-03-21  3:12                         ` Dan Williams
2019-03-21  3:12                           ` Dan Williams
2019-03-21  3:12                           ` Dan Williams
2019-03-21  3:12                           ` Dan Williams
2019-02-28  9:21 ` [PATCH 1/2] fs/dax: deposit pagetable even when installing zero page Jan Kara
2019-02-28  9:21   ` Jan Kara
2019-02-28 12:34   ` Aneesh Kumar K.V
2019-02-28 12:34     ` Aneesh Kumar K.V

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2452a0b6-a90e-52b8-cb9f-0b5a7fafbe64@linux.ibm.com \
    --to=aneesh.kumar@linux.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=dan.j.williams@intel.com \
    --cc=jack@suse.cz \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=oohall@gmail.com \
    --cc=zwisler@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.