All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Mason <chris.mason@fusionio.com>
To: Dave Kleikamp <dave.kleikamp@oracle.com>
Cc: Chris Mason <clmason@fusionio.com>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Rik van Riel <riel@redhat.com>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Waiman Long <Waiman.Long@hp.com>,
	Davidlohr Bueso <davidlohr.bueso@hp.com>,
	Emmanuel Benisty <benisty.e@gmail.com>,
	"Vinod, Chegu" <chegu_vinod@hp.com>,
	"Low, Jason" <jason.low2@hp.com>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	"aquini@redhat.com" <aquini@redhat.com>,
	Michel Lespinasse <walken@google.com>,
	Ingo Molnar <mingo@kernel.org>,
	Larry Woodman <lwoodman@redhat.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH v2 0/4] ipc: reduce ipc lock contention
Date: Thu, 7 Mar 2013 11:42:48 -0500	[thread overview]
Message-ID: <20130307164248.GC5784@shiny.masoncoding.com> (raw)
In-Reply-To: <5138B84F.1060807@oracle.com>

On Thu, Mar 07, 2013 at 08:54:55AM -0700, Dave Kleikamp wrote:
> On 03/07/2013 06:55 AM, Chris Mason wrote:
> > On Thu, Mar 07, 2013 at 01:45:33AM -0700, Peter Zijlstra wrote:
> >> On Tue, 2013-03-05 at 15:53 -0500, Rik van Riel wrote:
> >>
> >>> Indeed.  Though how well my patches will work with Oracle will
> >>> depend a lot on what kind of semctl syscalls they are doing.
> >>>
> >>> Does Oracle typically do one semop per semctl syscall, or does
> >>> it pass in a whole bunch at once?
> >>
> >> https://oss.oracle.com/~mason/sembench.c
> >>
> >> I think Chris wrote that to match a particular pattern of semaphore
> >> operations the database engine in question does. I haven't checked to
> >> see if it triggers the case in point though.
> >>
> >> Also, Chris since left Oracle but maybe he knows who to poke.
> >>
> > 
> > Dave Kleikamp (cc'd) took over my patches and did the most recent
> > benchmarking.  Ported against 3.0:
> > 
> > https://oss.oracle.com/git/?p=linux-uek-2.6.39.git;a=commit;h=c7fa322dd72b08450a440ef800124705a1fa148c
> > 
> > The current versions are still in the 2.6.32 oracle kernel, but it looks
> > like they reverted this 3.0 commit.  I think with Manfred's upstream
> > work my more complex approach wasn't required anymore, but hopefully
> > Dave can fill in details.
> 
> From what I recall, I could never get better performance from your
> patches that we saw with Manfred's work alone. I can't remember the
> reasons for including and then reverting the patches from the 3.0
> (2.6.39) Oracle kernel, but in the end we weren't able to justify their
> inclusion.

Ok, so after this commit, oracle was happy:

commit fd5db42254518fbf241dc454e918598fbe494fa2
Author: Manfred Spraul <manfred@colorfullife.com>
Date:   Wed May 26 14:43:40 2010 -0700

    ipc/sem.c: optimize update_queue() for bulk wakeup calls

But that doesn't explain why Davidlohr saw semtimedop at the top of the
oracle profiles in his runs.

Looking through the patches in this thread, I don't see anything that
I'd expect to slow down oracle TPC numbers.

I dealt with the ipc_perm lock a little differently:

https://oss.oracle.com/git/?p=linux-uek-2.6.39.git;a=commitdiff;h=78fe45325c8e2e3f4b6ebb1ee15b6c2e8af5ddb1;hp=8102e1ff9d667661b581209323faaf7a84f0f528

My code switched the ipc_rcu_hdr refcount to an atomic, which changed
where I needed the spinlock.  It may make things easier in patches 3/4
and 4/4.

(some of this code was Jens, but at the time he made me promise to
pretend he never touched it)

-chris


  reply	other threads:[~2013-03-07 16:42 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-05  9:35 [PATCH v2 0/4] ipc: reduce ipc lock contention Davidlohr Bueso
2013-03-05 15:40 ` Linus Torvalds
2013-03-06  7:13   ` Davidlohr Bueso
2013-03-06 16:01     ` Linus Torvalds
2013-03-05 17:10 ` Rik van Riel
2013-03-05 19:42   ` Waiman Long
2013-03-05 20:52     ` Linus Torvalds
2013-03-05 20:53       ` Rik van Riel
2013-03-06  3:46         ` Waiman Long
2013-03-06  3:53           ` Rik van Riel
2013-03-06  7:14             ` Davidlohr Bueso
2013-03-07  8:45         ` Peter Zijlstra
2013-03-07 12:55           ` Chris Mason
2013-03-07 15:54             ` Dave Kleikamp
2013-03-07 16:42               ` Chris Mason [this message]
2013-03-06 22:13 ` [PATCH v2 5/4] ipc: replace ipc_perm.lock with an rwlock Rik van Riel
2013-03-06 22:14 ` [PATCH v2 6/4] ipc: open code and rename sem_lock Rik van Riel
2013-03-06 22:15 ` [PATCH v2 7/4] ipc: fine grained locking for semtimedop Rik van Riel
2013-03-06 22:57   ` Linus Torvalds
2013-03-06 23:09     ` Rik van Riel
2013-03-07  1:36   ` Davidlohr Bueso
2013-03-07 20:55     ` Rik van Riel

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=20130307164248.GC5784@shiny.masoncoding.com \
    --to=chris.mason@fusionio.com \
    --cc=Waiman.Long@hp.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=akpm@linux-foundation.org \
    --cc=aquini@redhat.com \
    --cc=benisty.e@gmail.com \
    --cc=chegu_vinod@hp.com \
    --cc=clmason@fusionio.com \
    --cc=dave.kleikamp@oracle.com \
    --cc=davidlohr.bueso@hp.com \
    --cc=hpa@zytor.com \
    --cc=jason.low2@hp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lwoodman@redhat.com \
    --cc=mingo@kernel.org \
    --cc=riel@redhat.com \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    --cc=walken@google.com \
    /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.