pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-hlr/+/42017?usp=email )
Change subject: tests/db_upgrade: Use log stderr blocking-io
......................................................................
tests/db_upgrade: Use log stderr blocking-io
When --db-check is used, osmo-hlr actually becomes a synchronous
non-interactive program instead of a daemon.
In that case, we want to use blocking-io since it doesn't use the event
loop, so we want to flush all logging synchrnously before exiting.
Change-Id: Ic81eacbcc0432b81debc52c49fddc668c7a062b3
---
M tests/db_upgrade/osmo-hlr.cfg
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/17/42017/1
diff --git a/tests/db_upgrade/osmo-hlr.cfg b/tests/db_upgrade/osmo-hlr.cfg
index 7fb12c1..9f5ce42 100644
--- a/tests/db_upgrade/osmo-hlr.cfg
+++ b/tests/db_upgrade/osmo-hlr.cfg
@@ -1,4 +1,4 @@
-log stderr
+log stderr blocking-io
logging level db notice
logging print category-hex 0
logging print file 0
--
To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/42017?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-Change-Id: Ic81eacbcc0432b81debc52c49fddc668c7a062b3
Gerrit-Change-Number: 42017
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-hlr/+/42018?usp=email )
Change subject: osmo-hlr: Force log stderr blocking-io in --db-check mode
......................................................................
osmo-hlr: Force log stderr blocking-io in --db-check mode
When --db-check is used, osmo-hlr actually becomes a synchronous
non-interactive program instead of a daemon.
In that case, we want to use blocking-io since it doesn't use the event
loop, so we want to flush all logging synchronously before exiting.
Usually the user will pass the same osmo-hlr.cfg when running with
--db-check, which means most probably won't be using blocking-io (as
expected when osmo-hlr runs in daemon mode).
Since --db-check converts osmo-hlr to a cmdline which exits after checks
are done, we actually want to force blocking-io in that case, so that
all content is written to stderr before finishing the process.
Change-Id: If5e505383086cc55d724c0d6891756c8d94fa267
---
M src/hlr.c
1 file changed, 5 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/18/42018/1
diff --git a/src/hlr.c b/src/hlr.c
index 0cfa09a..038a0a4 100644
--- a/src/hlr.c
+++ b/src/hlr.c
@@ -809,6 +809,11 @@
return rc;
}
+ if (cmdline_opts.db_check) {
+ /* Make sure to use synchronous logging to stderr in --db-check (non-interactive mode): */
+ log_target_file_switch_to_stream(osmo_stderr_target);
+ }
+
LOGP(DMAIN, LOGL_NOTICE, "hlr starting\n");
rc = rand_init();
--
To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/42018?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-Change-Id: If5e505383086cc55d724c0d6891756c8d94fa267
Gerrit-Change-Number: 42018
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcap/+/42015?usp=email )
Change subject: server: wr_file: Request up to 8 iofd write buffers if available
......................................................................
server: wr_file: Request up to 8 iofd write buffers if available
Writing to disk is usually slower than handling network traffic, so it's
a desirable to increase write buffers to try to submit our write queue
to the kernel/VFS as fast as possible, to avoid it growing too much.
This should also improve CPU use at the expense of some dozen KBs of
extra use, which in the server should be plenty available.
Depends: libosmocore.git 378cf564c8859311415aa70adeb220cedbe56eb3
Change-Id: I167e5f9b7f9d5693b3df05f713288c741031c532
---
M TODO-RELEASE
M src/osmo_pcap_wr_file.c
2 files changed, 8 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-pcap refs/changes/15/42015/1
diff --git a/TODO-RELEASE b/TODO-RELEASE
index 0ed7189..b52b9a8 100644
--- a/TODO-RELEASE
+++ b/TODO-RELEASE
@@ -7,3 +7,4 @@
# If any interfaces have been added since the last public release: c:r:a + 1.
# If any interfaces have been removed or changed since the last public release: c:r:0.
#library what description / commit summary line
+libosmocore >1.12.1 osmo_iofd_set_io_buffers(..., 0) returning maximum available write buffer value.
diff --git a/src/osmo_pcap_wr_file.c b/src/osmo_pcap_wr_file.c
index d60c5a7..3510c59 100644
--- a/src/osmo_pcap_wr_file.c
+++ b/src/osmo_pcap_wr_file.c
@@ -125,7 +125,14 @@
&ioops, wrf);
if (!wrf->local_iofd)
return -EBADFD;
+
osmo_iofd_set_txqueue_max_length(wrf->local_iofd, wrf->wr_queue_max_length);
+
+ /* Request to use 8 write buffers, or less if not as many are available: */
+ rc = osmo_iofd_set_io_buffers(wrf->local_iofd, OSMO_IO_OP_WRITE, 0);
+ if (rc > 0)
+ osmo_iofd_set_io_buffers(wrf->local_iofd, OSMO_IO_OP_WRITE, OSMO_MIN(rc, 8));
+
if (osmo_iofd_register(wrf->local_iofd, -1) < 0) {
osmo_iofd_free(wrf->local_iofd);
wrf->local_iofd = NULL;
--
To view, visit https://gerrit.osmocom.org/c/osmo-pcap/+/42015?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-pcap
Gerrit-Branch: master
Gerrit-Change-Id: I167e5f9b7f9d5693b3df05f713288c741031c532
Gerrit-Change-Number: 42015
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>