am 858d0dd1: Merge "set /proc/sys/net/unix/max_dgram_qlen to large value"

* commit '858d0dd1e529575181abd8de607e46f7b273cc9d':
  set /proc/sys/net/unix/max_dgram_qlen to large value
This commit is contained in:
Mark Salyzyn 2014-03-11 18:28:50 +00:00 committed by Android Git Automerger
commit f447c1b3ae
4 changed files with 9 additions and 2 deletions

View File

@ -38,6 +38,7 @@ public:
virtual ~SocketListener();
int startListener();
int startListener(int backlog);
int stopListener();
void sendBroadcast(int code, const char *msg, bool addErrno);

View File

@ -70,6 +70,10 @@ SocketListener::~SocketListener() {
}
int SocketListener::startListener() {
return startListener(4);
}
int SocketListener::startListener(int backlog) {
if (!mSocketName && mSock == -1) {
SLOGE("Failed to start unbound listener");
@ -84,7 +88,7 @@ int SocketListener::startListener() {
SLOGV("got mSock = %d for %s", mSock, mSocketName);
}
if (mListen && listen(mSock, 4) < 0) {
if (mListen && listen(mSock, backlog) < 0) {
SLOGE("Unable to listen on socket (%s)", strerror(errno));
return -1;
} else if (!mListen)

View File

@ -105,7 +105,8 @@ int main() {
// and LogReader is notified to send updates to connected clients.
LogListener *swl = new LogListener(logBuf, reader);
if (swl->startListener()) {
// Backlog and /proc/sys/net/unix/max_dgram_qlen set to large value
if (swl->startListener(300)) {
exit(1);
}

View File

@ -100,6 +100,7 @@ loglevel 3
write /proc/sys/kernel/dmesg_restrict 1
write /proc/sys/vm/mmap_min_addr 32768
write /proc/sys/net/ipv4/ping_group_range "0 2147483647"
write /proc/sys/net/unix/max_dgram_qlen 300
write /proc/sys/kernel/sched_rt_runtime_us 950000
write /proc/sys/kernel/sched_rt_period_us 1000000