1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00
samba-mirror/ctdb
Amitay Isaacs 04a061e4d1 ctdb-io: Do not use sys_write to write to client sockets
When sending messages to clients, ctdb checks for EAGAIN error code and
schedules next write in the subsequent event loop.  Using sys_write in
these places causes ctdb to loop hard till a client is able to read from
the socket.  With real time scheduling, ctdb daemon spins consuming 100%
of CPU trying to write to the client sockets.  This can be quite harmful
when running under VMs or machines with single CPU.

This regression was introduced when all read/write calls were replaced to
use sys_read/sys_write wrappers (c1558adeaa).

The existing code backs off in case of EAGAIN failures and waits for an
event loop to process the write again.  This should give ctdb clients
a chance to get scheduled and to process the ctdb socket.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>

Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Tue Feb 24 12:29:30 CET 2015 on sn-devel-104
2015-02-24 12:29:30 +01:00
..
client ctdb-client: Return a value of 1 when setting obsolete tunable variable 2015-02-18 05:34:06 +01:00
common ctdb-io: Do not use sys_write to write to client sockets 2015-02-24 12:29:30 +01:00
config ctdb-scripts: Improve messages about invalid tunables during "setup" 2015-02-18 08:03:33 +01:00
doc ctdb: Change default debug level to NOTICE (2) 2015-02-18 05:34:06 +01:00
ib ctdb-logging: Change LogLevel to DEBUGLEVEL 2014-10-06 12:34:33 +02:00
include ctdb-recoverd: Simplify ctdb_recovery_lock() 2015-02-13 07:19:07 +01:00
packaging ctdb-build: Fix handling of public headers 2014-10-06 14:56:06 +02:00
server ctdb-client: Return a value of 1 when setting obsolete tunable variable 2015-02-18 05:34:06 +01:00
tcp ctdb: Rename CTDB_VERSION to CTDB_PROTOCOL 2014-10-28 05:42:05 +01:00
tests ctdb-scripts: Improve messages about invalid tunables during "setup" 2015-02-18 08:03:33 +01:00
tools ctdb-tool: Print a warning when setting an obsolete tunable variable 2015-02-18 05:34:06 +01:00
utils ctdb-utils: Update Nagios code to use ctdb -X 2014-12-05 21:02:40 +01:00
web web: Add links to new manpages 2013-10-30 15:37:54 +11:00
.bzrignore more code rearrangement 2007-06-07 22:16:48 +10:00
.gitignore git: Ignore generated documentation files 2013-10-22 13:07:13 +11:00
configure ctdb-build: Allow configure and Makefile to find waf in tarball 2014-09-10 01:36:14 +02:00
configure.rpm ctdb-build: Change from ctdb-util to samba-util 2014-10-06 12:34:33 +02:00
COPYING add a licence file 2009-02-07 08:10:34 +11:00
ctdb.pc.in (This used to be ctdb commit b0718551f55d5da9be0e6aba233f57c1ff8509be) 2009-04-08 09:14:20 +10:00
Makefile ctdb-build: Allow configure and Makefile to find waf in tarball 2014-09-10 01:36:14 +02:00
NEWS ctdb: Update NEWS 2013-11-27 18:46:17 +01:00
README doc: README - add information about CTDB, license and website 2012-10-22 17:39:49 +11:00
wscript ctdb-build: fix build without xsltproc 2014-12-15 13:53:08 +01:00

This is the release version of CTDB, a clustered implementation of TDB
database used by Samba and other projects to store temporary data.

This software is freely distributable under the GNU public license,
a copy of which you should have received with this software (in a file
called COPYING).

For documentation on CTDB, please visit CTDB website http://ctdb.samba.org.