Re: [RFC PATCH] Fix aio performance regression for database causedby THP

From: Khalid Aziz
Date: Thu Aug 15 2013 - 16:17:49 EST


On Thu, 2013-08-15 at 12:34 -0700, Andi Kleen wrote:
> Khalid Aziz <khalid.aziz@xxxxxxxxxx> writes:
>
> > I am working with a tool that simulates oracle database I/O workload.
> > This tool (orion to be specific -
> > <http://docs.oracle.com/cd/E11882_01/server.112/e16638/iodesign.htm#autoId24>)
> > allocates hugetlbfs pages using shmget() with SHM_HUGETLB flag.
>
> Is this tool available for download?

I am not sure if it is available separately. It is part of Oracle 11gR2
release.

>
> I would rather prefer to address the locking overhead in THP too.
>
> The fundamental problem is that we have to touch all the pages?

Not so much that THP has to touch all the pages, rather it checks the
head and tail flags multiple times with the assumption they could change
underneath. Then it executes memory barriers (in compound_trans_head())
to force any updates to these flags from all cores. It also locks the
head page (in put_compound_page()) which stops any other thread trying
to put reference to one of the pages in the compound page. I see a lot
of cycles being spent in compound_trans_head() and various atomic
operations in the path added by THP.

--
Khalid


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/