The Samba-Bugzilla – Attachment 6799 Details for
Bug 8395
optimize serverid_exists() for Solaris.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
git-am fix for 3.6.1
0001-Fix-bug-8395-optimize-serverid_exists-for-Solaris.patch (text/plain), 1.14 KB, created by
Jeremy Allison
on 2011-08-22 19:48:09 UTC
(
hide
)
Description:
git-am fix for 3.6.1
Filename:
MIME Type:
Creator:
Jeremy Allison
Created:
2011-08-22 19:48:09 UTC
Size:
1.14 KB
patch
obsolete
>From 881b244acea5bf62f9905446df41f9a5c6ab5110 Mon Sep 17 00:00:00 2001 >From: Ira Cooper <ira@wakeful.net> >Date: Mon, 22 Aug 2011 12:46:41 -0700 >Subject: [PATCH] Fix bug #8395 - optimize serverid_exists() for Solaris. > >jra asked: > > Do you have any idea on how many calls it saves, > and what help the optimization gives ? > >As far as calls: Not 100% sure, dtrace pointed the issue out to me, and when I >saw 10-50%(Or more), I looked for an easy fix. > >The real expense here is the fnctl locks on the database. That's pretty >painful. 1000ns per call, and probably 3-4 calls in that chain. So it doesn't >take much to come out ahead was my math. >--- > source3/lib/serverid.c | 6 +++++- > 1 files changed, 5 insertions(+), 1 deletions(-) > >diff --git a/source3/lib/serverid.c b/source3/lib/serverid.c >index b1f6a57..8cd7f5a 100644 >--- a/source3/lib/serverid.c >+++ b/source3/lib/serverid.c >@@ -233,7 +233,11 @@ bool serverid_exists(const struct server_id *id) > struct serverid_key key; > TDB_DATA tdbkey; > >- if (lp_clustering() && !process_exists(*id)) { >+ if (procid_is_me(id)) { >+ return true; >+ } >+ >+ if (!process_exists(*id)) { > return false; > } > >-- >1.7.3.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
vl
:
review+
Actions:
View
Attachments on
bug 8395
: 6799