Performance problem with async echo handler

Volker Lendecke Volker.Lendecke at SerNet.DE
Thu Dec 6 08:38:17 MST 2012


Hi!

Attached find patches for master and 3.6 that fix a
performance problem when the async echo responder is
activated and many client connections are present.

Whoever feels like it, please push the master patch. I'm not
sure the 3.6 one warrants a bug, but it might be interesting
for people shipping 3.6 with the async echo handler
activated.

With best regards,

Volker Lendecke

-- 
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de
-------------- next part --------------
From eb9f2eddbff2efba3ef80396ad1c7c6762d2eb04 Mon Sep 17 00:00:00 2001
From: Volker Lendecke <vl at samba.org>
Date: Thu, 6 Dec 2012 15:51:55 +0100
Subject: [PATCH] s3: Fix clear_if_first for the async echo handler

A worker smbd is as not long-lived as the main smbd, but as the async
echo handler exits when the worker smbd does, passing "true" here is the
right thing to do and fixes our clear_if_first handling when the async
echo handler is active.
---
 source3/smbd/process.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/source3/smbd/process.c b/source3/smbd/process.c
index eeda6f9..f89ca02 100644
--- a/source3/smbd/process.c
+++ b/source3/smbd/process.c
@@ -3068,7 +3068,7 @@ bool fork_echo_handler(struct smbd_server_connection *sconn)
 
 		status = reinit_after_fork(sconn->msg_ctx,
 					   sconn->ev_ctx,
-					   false);
+					   true);
 		if (!NT_STATUS_IS_OK(status)) {
 			DEBUG(1, ("reinit_after_fork failed: %s\n",
 				  nt_errstr(status)));
-- 
1.7.3.4

-------------- next part --------------
From 1186c4b17294e9b875e3d5dde5a6c60d3996030f Mon Sep 17 00:00:00 2001
From: Volker Lendecke <vl at samba.org>
Date: Thu, 6 Dec 2012 15:51:55 +0100
Subject: [PATCH] s3: Fix clear_if_first for the async echo handler

A worker smbd is as not long-lived as the main smbd, but as the async
echo handler exits when the worker smbd does, passing "true" here is the
right thing to do and fixes our clear_if_first handling when the async
echo handler is active.
---
 source3/smbd/process.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/source3/smbd/process.c b/source3/smbd/process.c
index 358d051..e8abc5b 100644
--- a/source3/smbd/process.c
+++ b/source3/smbd/process.c
@@ -2834,7 +2834,7 @@ bool fork_echo_handler(struct smbd_server_connection *sconn)
 
 		status = reinit_after_fork(sconn->msg_ctx,
 					   smbd_event_context(),
-					   procid_self(), false);
+					   procid_self(), true);
 		if (!NT_STATUS_IS_OK(status)) {
 			DEBUG(1, ("reinit_after_fork failed: %s\n",
 				  nt_errstr(status)));
-- 
1.7.3.4



More information about the samba-technical mailing list