On Wed, Mar 6, 2019 at 4:46 AM Aneesh Kumar K.V <aneesh.kumar@xxxxxxxxxxxxx> wrote: > > On 3/6/19 5:14 PM, Michal Suchánek wrote: > > On Wed, 06 Mar 2019 14:47:33 +0530 > > "Aneesh Kumar K.V" <aneesh.kumar@xxxxxxxxxxxxx> wrote: > > > >> Dan Williams <dan.j.williams@xxxxxxxxx> writes: > >> > >>> On Thu, Feb 28, 2019 at 1:40 AM Oliver <oohall@xxxxxxxxx> wrote: > >>>> > >>>> On Thu, Feb 28, 2019 at 7:35 PM Aneesh Kumar K.V > >>>> <aneesh.kumar@xxxxxxxxxxxxx> wrote: > > > >> Also even if the user decided to not use THP, by > >> echo "never" > transparent_hugepage/enabled , we should continue to map > >> dax fault using huge page on platforms that can support huge pages. > > > > Is this a good idea? > > > > This knob is there for a reason. In some situations having huge pages > > can severely impact performance of the system (due to host-guest > > interaction or whatever) and the ability to really turn off all THP > > would be important in those cases, right? > > > > My understanding was that is not true for dax pages? These are not > regular memory that got allocated. They are allocated out of /dev/dax/ > or /dev/pmem*. Do we have a reason not to use hugepages for mapping > pages in that case? The problem with the transparent_hugepage/enabled interface is that it conflates performing compaction work to produce THP-pages with the ability to map huge pages at all. The compaction is a nop for dax because the memory is already statically allocated. If the administrator does not want dax to consume huge TLB entries then don't configure huge-page dax. If a hypervisor wants to force disable huge-page-configured device-dax instances after the fact it seems we need an explicit interface for that and not overload transparent_hugepage/enabled.