Re: [osv-dev] Upgrading musl - more detailed plan

2020-08-03 Thread Nadav Har'El
On Sun, Aug 2, 2020 at 8:32 AM Waldek Kozaczuk wrote: > This is possibly one of the longest emails I have ever written. So bear > with me ... > I'll try :-) Replies inline: > After all the recent patches, I have submitted that replaced many source > files under libc/ (~70) and headers under in

Re: [osv-dev] [PATCH] libc: replace include/api/ifaddrs.h with the symlink to its identical musl copy

2020-08-03 Thread Nadav Har'El
It seems you already did this change in a bigger patch and this one should be dropped, right? -- Nadav Har'El n...@scylladb.com On Sat, Aug 1, 2020 at 8:09 AM Waldemar Kozaczuk wrote: > Signed-off-by: Waldemar Kozaczuk > --- > include/api/

[osv-dev] [RFC PATCH] Add new mechanism for function aliases

2020-08-03 Thread Nadav Har'El
iases.c) allows us to drop a change from musl (here res_init.c). Signed-off-by: Nadav Har'El --- Makefile| 3 ++- libc/aliases.c | 31 +++ libc/network/res_init.c | 7 --- 3 files changed, 33 insertions(+), 8 deletions(-) create mode 1

[osv-dev] Re: [RFC PATCH] Add new mechanism for function aliases

2020-08-03 Thread Nadav Har'El
I want to later create an alternative patch to this that uses a linker script (e.g., libc/aliases.ld) to copy symbols - and then we can decide which approach is nicer (or less ugly). -- Nadav Har'El n...@scylladb.com On Tue, Aug 4, 2020 at 1:40 AM Nadav Har'El wrote: > For a long

[osv-dev] [PATCH v2] Add new mechanism for function aliases - outside original source file

2020-08-03 Thread Nadav Har'El
es, wrappers in libc/math/aliases.cc) to the new aliases.ld. Signed-off-by: Nadav Har'El --- Makefile| 2 +- arch/aarch64/loader.ld | 1 + arch/x64/loader.ld | 1 + libc/aliases.ld | 12 libc/network/res_init.c | 7 --- 5 files changed, 15 i

[osv-dev] Re: [RFC PATCH] Add new mechanism for function aliases

2020-08-03 Thread Nadav Har'El
On Tue, Aug 4, 2020 at 1:41 AM Nadav Har'El wrote: > I want to later create an alternative patch to this that uses a linker > script (e.g., libc/aliases.ld) to copy symbols - and then we can decide > which approach is nicer (or less ugly). > > Done. Just sent a v2 with a l

Re: [osv-dev] [PATCH v2] Add new mechanism for function aliases - outside original source file

2020-08-05 Thread Nadav Har'El
On Wed, Aug 5, 2020 at 7:36 AM Waldek Kozaczuk wrote: > This looks like a great solution. I was about to commit but I realized > that alias symbols like __res_init become global symbols vs weak in > loader.elf. Does it have any practical consequences to how they are handled > by OSv dynamic link

Re: [osv-dev] ISR and schd::preemptable problems in resolve_pltgot

2020-08-06 Thread Nadav Har'El
On Thu, Aug 6, 2020 at 1:00 AM Rick Payne wrote: > > I've been noodling with the old 'assigned virtio' code, trying to make > it work again so I can use this method to get raw packets. See > discusion on the 'raw sockets' thread. > > I'm mostly there (though I will admit, I'm far from a C++ progr

Re: [osv-dev] ISR and schd::preemptable problems in resolve_pltgot

2020-08-06 Thread Nadav Har'El
On Thu, Aug 6, 2020 at 11:02 AM Nadav Har'El wrote: > The assert was there to make a rare random crash into a reliable crash. > The thing is > that symbol resolution needs to take a mutex, because in very rare cases > it might be > running in parallel to someone loading

Re: [osv-dev] [RFC 2] libc: replace syscall call with variadic macro and inlined function

2020-08-09 Thread Nadav Har'El
On Mon, Aug 10, 2020 at 8:02 AM Waldemar Kozaczuk wrote: > In more complicated situations when single musl file > calls syscall() for 2 or more system call types (like stdio/tmpnam.o), > we cannot have single macro that will solve it like previous patch > did. > > In those cases we fallback to st

Re: [osv-dev] syscall() call in libc/network/if_nameindex.c

2020-08-11 Thread Nadav Har'El
On Mon, Aug 10, 2020 at 5:17 PM Waldek Kozaczuk wrote: > Any reason why we use __syscall(SYS_close, ...) vs close()? > > struct if_nameindex *if_nameindex() > { > size_t n; > void *p = 0; > int s = socket(AF_INET, SOCK_DGRAM|SOCK_CLOEXEC, 0); > if (s>=0) { > for (n=0; (p=do_nameindex(s, n)) == (v

Re: [osv-dev] [RFC 2] libc: replace syscall call with variadic macro and inlined function

2020-08-11 Thread Nadav Har'El
On Mon, Aug 10, 2020 at 6:50 PM Waldek Kozaczuk wrote: > > There is one thing to discuss. While I agree that we should use ' > --include libc/*syscall_to*_function.h' for all musl source and have > compiler detect any undefined individual translation macros (like > __OSV_TO_FUNCTION_SYS_clock_get

Re: [osv-dev] include/api/$ARCH/bits/alltypes.h.sh and musl upgrade

2020-08-11 Thread Nadav Har'El
On Mon, Aug 10, 2020 at 5:21 PM Waldek Kozaczuk wrote: > Can anyone explain the motivation behind this script and how the generated > alltypes.h is intended to be used? I can try. I think we took this idea from Musl. The C library has type definitions in a lot of different header files. For ex

Re: [osv-dev] [PATCH 4/9] libc: drop setlocale.c and duplocale.c and add __setlocale alias

2020-08-15 Thread Nadav Har'El
Don't you also need to add the alias __duplocale? On Sat, Aug 15, 2020, 07:27 Waldemar Kozaczuk wrote: > Signed-off-by: Waldemar Kozaczuk > --- > Makefile| 4 ++-- > libc/aliases.ld | 1 + > libc/locale/duplocale.c | 15 --- > libc/locale/setlocale.c | 13

Re: [osv-dev] [COMMIT osv master] tests: adapted w/ctype tests to work with boost unittest and added tst-string

2020-08-20 Thread Nadav Har'El
On Thu, Aug 20, 2020 at 7:18 AM Commit Bot wrote: > From: Waldemar Kozaczuk > Committer: Waldemar Kozaczuk > Branch: master > > tests: adapted w/ctype tests to work with boost unittest and added > tst-string > > Signed-off-by: Waldemar Kozaczuk > > --- > diff --git a/modules/tests/Makefile b/m

Re: [osv-dev] [COMMIT osv master] fs:change uiomove() to use size_t in the signature instead of int

2020-08-20 Thread Nadav Har'El
// looks like a large number, but gets treated as "-1". uiomove(..., x)// x sign extended to 64-bit "-1", i.e., 18446744073709551616, will refuse to work because > SSIZE_MAX, so good. -- Nadav Har'El n...@scylladb.com On Thu, Aug 20, 2020 at 7:18 AM Commit B

Re: [osv-dev] [PATCH 1/5] tests: added bionic-based unit test to test time libc functions

2020-08-26 Thread Nadav Har'El
I will commit, but I think you forgot to patch the makefile to actually build this test? If that's true please send a followup patch. -- Nadav Har'El n...@scylladb.com On Wed, Aug 26, 2020 at 6:54 AM Waldemar Kozaczuk wrote: > This patch adds new unit test tst-time.cc that te

Re: [PATCH 1/8] osv: xen: independent event interrupt bring up

2017-03-05 Thread Nadav Har'El
On Fri, Mar 3, 2017 at 11:45 AM, 'Sergiy Kibrik' via OSv Development < osv-dev@googlegroups.com> wrote: > Initialize Xen event interrupt separately from xenbus driver, so that > events > can be served before xenbus is up, or even in case when xenbus not being > probed > at all or not required, e.g

Re: [PATCH 2/8] osv: xen: split xenbus into generic & PCI parts

2017-03-05 Thread Nadav Har&#x27;El
On Fri, Mar 3, 2017 at 11:45 AM, 'Sergiy Kibrik' via OSv Development < osv-dev@googlegroups.com> wrote: > Xen platform PCI is x86-specific feature, not currently present on aarch64. > > For xenbus to work on both platforms the generic xenbus driver should be > probed > directly (under aarch64 in c

Re: [PATCH 4/8] osv: aarch64: support processor::features()

2017-03-05 Thread Nadav Har&#x27;El
Reviewed-by: Nadav Har'El On Fri, Mar 3, 2017 at 11:45 AM, 'Sergiy Kibrik' via OSv Development < osv-dev@googlegroups.com> wrote: > Features used by various Xen drivers, i.e. xenbus. > > Signed-off-by: Sergiy Kibrik > --- > arch/aarch64/cpuid.cc | 1

Re: [PATCH 8/8] xenconsole: shared ring suport

2017-03-05 Thread Nadav Har&#x27;El
On Fri, Mar 3, 2017 at 11:45 AM, 'Sergiy Kibrik' via OSv Development < osv-dev@googlegroups.com> wrote: > Complete driver to properly work with xl console utility, i.e. full > read/write > access. Driver is extended to work with shared structure (ring) and event > channel. > > Signed-off-by: Sergi

[PATCH] kill(): remove duplicate code

2017-03-06 Thread Nadav Har&#x27;El
Just a few lines above, we had exactly the same code... No need to do it again. Signed-off-by: Nadav Har'El --- libc/signal.cc | 4 1 file changed, 4 deletions(-) diff --git a/libc/signal.cc b/libc/signal.cc index b7351ee..832002c 100644 --- a/libc/signal.cc +++ b/libc/sign

[PATCH] tests/tst-kill: make compilable on Linux as well

2017-03-06 Thread Nadav Har&#x27;El
Stop using OSv-specific features (namely debug()) in this test, so we can also run it on Linux. This test currently hangs on Linux, because the test assumes that signal() sets system calls to not restart - while on Linux, they do. Signed-off-by: Nadav Har'El --- tests/tst-kill.cc

[PATCH] tests/tst-kill: fix hang on Linux

2017-03-06 Thread Nadav Har&#x27;El
-off-by: Nadav Har'El --- tests/tst-kill.cc | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/tests/tst-kill.cc b/tests/tst-kill.cc index fa99eb8..3d4f942 100644 --- a/tests/tst-kill.cc +++ b/tests/tst-kill.cc @@ -78,8 +78,16 @@ int main(int ac, char** av) r

[PATCH] tests/tst-kill: fix failing test on Linux

2017-03-06 Thread Nadav Har&#x27;El
We tested that killing a non-existant process 17 resulted in an error. But on Linux, it is quite possible that process 17 does exist, and this test will fail. So change it to an even less likely to exist number. Signed-off-by: Nadav Har'El --- tests/tst-kill.cc | 2 +- 1 file chang

Re: [PATCH] loader: fix log redirection append option

2017-03-06 Thread Nadav Har&#x27;El
Looks good. I wonder how I tested the original code ;-) I think my original intention was to do an lseek() - once - instead of O_APPEND - but this lseek is missing. O_APPEND should work too, it's somewhat of an overkill I guess, but should work. I'll commit this. -- Nada

Re: [PATCH 1/8] osv: xen: independent event interrupt bring up

2017-03-06 Thread Nadav Har&#x27;El
On Mon, Mar 6, 2017 at 4:08 PM, Sergiy Kibrik wrote: > On 03/05/2017 11:08 AM, Nadav Har'El wrote: > > > On Fri, Mar 3, 2017 at 11:45 AM, 'Sergiy Kibrik' via OSv Development < > osv-dev@googlegroups.com> wrote: > >> Initialize Xen event interrupt sep

Re: [PATCH 8/8] xenconsole: shared ring suport

2017-03-06 Thread Nadav Har&#x27;El
On Mon, Mar 6, 2017 at 5:24 PM, Sergiy Kibrik wrote: > > On 03/05/2017 12:45 PM, Nadav Har'El wrote: > > > + > >> void XEN_Console::write(const char *str, size_t len) { >> - HYPERVISOR_console_write(str, len); >> +

Re: [PATCH 8/8] xenconsole: shared ring suport

2017-03-13 Thread Nadav Har&#x27;El
On Mon, Mar 13, 2017 at 12:38 PM, Sergiy Kibrik < sergiy.kib...@globallogic.com> wrote: > On 03/06/2017 05:24 PM, Sergiy Kibrik wrote: > > +return _interface->in_cons != _interface->in_prod; >> } >> >> char XEN_Console::readch() { >> -return '\0'; /*TODO: support input */ >> +XENCONS

[PATCH] line-discipline: move and update comment

2017-03-13 Thread Nadav Har&#x27;El
: Nadav Har'El --- drivers/line-discipline.cc | 52 -- 1 file changed, 27 insertions(+), 25 deletions(-) diff --git a/drivers/line-discipline.cc b/drivers/line-discipline.cc index 4e21769..082c392 100644 --- a/drivers/line-discipline.cc +++ b/drivers

Re: [RFC] test-SIOCGIFCONF

2017-03-13 Thread Nadav Har&#x27;El
On Mon, Mar 13, 2017 at 4:21 PM, Justin Cinkelj wrote: > Based on what open-mpi does. > Did you copy code from open-mpi? Is the license compatible? Should we add a copyright comment? Also, what I see below doesn't seem to be a test - how can it fail? Maybe you want it in tests/misc-something, i

Re: [RFC] test-SIOCGIFCONF

2017-03-13 Thread Nadav Har&#x27;El
On Mon, Mar 13, 2017 at 4:32 PM, Nadav Har'El wrote: > > > We need to understand how IFF_SLAVE and IFF_SIMPLEX came to have the same > bit... Did we get one from BSD and one from Linux? > Indeed this seems to be the case. The bits which Linux applications expect are in /usr

[PATCH] SIOCGIFFLAGS ioctl: remove BSD-specific bits

2017-03-14 Thread Nadav Har&#x27;El
me bit position, 0x800). In particular OpenMPI did not like seeing this flag, and refused to use this network interface. Fixes #862 Signed-off-by: Nadav Har'El --- bsd/sys/compat/linux/linux_ioctl.cc | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/

[PATCH] gdb: fix error on connect on older distros

2017-03-15 Thread Nadav Har&#x27;El
OSv), the new names do not work and we need to use the old ones from before commit adf78de4 - otherwise we get errors on "connect". So in this patch we try both names, trying the new names first, and if they fail, the old names. Signed-off-by: Nadav Har'El --- scripts/loader.py |

[PATCH] gdb: fix "osv mmap" on connect on older distros

2017-03-16 Thread Nadav Har&#x27;El
e. Signed-off-by: Nadav Har'El --- scripts/loader.py | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/loader.py b/scripts/loader.py index b16538c..3a52377 100644 --- a/scripts/loader.py +++ b/scripts/loader.py @@ -245,7 +245,10 @@ def vma_list(node=None)

Re: What is in cloudius/osv-base?

2017-03-19 Thread Nadav Har&#x27;El
On Thu, Mar 16, 2017 at 2:15 PM, wrote: > Hi, >I have two questions. > > First, what are the features and components present in cloudius/osv-base > base image? > This and other "Capstan base images" are built by the script scripts/build-capstan-images. As you can see there, it includes the

Re: [PATCH v5] pthread_barrier*: Add OSv-specific pthread_barrier_init, wait, destroy + test

2017-03-19 Thread Nadav Har&#x27;El
On Fri, Dec 23, 2016 at 6:44 PM, Rean Griffith wrote: > Fixed and resubmitted. > > Thanks, > Rean > Hi, we see sporadic hangs of the pthread_barrier test in - I opeened an issue: https://github.com/cloudius-systems/osv/issues/857 Because I cannot reproduce this myself, I don't know yet if this

Re: [PATCH v2 8/8] xenconsole: shared ring suport

2017-03-20 Thread Nadav Har&#x27;El
On Mon, Mar 20, 2017 at 4:12 PM, Sergiy Kibrik < sergiy.kib...@globallogic.com> wrote: > On 03/20/2017 03:55 PM, Sergiy Kibrik wrote: > >> void XEN_Console::write(const char *str, size_t len) { >> - HYPERVISOR_console_write(str, len); >> +assert(len > 0); >> +if (!_interface) { >> +

Re: [PATCH v2 8/8] xenconsole: shared ring suport

2017-03-20 Thread Nadav Har&#x27;El
On Mon, Mar 20, 2017 at 6:38 PM, Sergiy Kibrik < sergiy.kib...@globallogic.com> wrote: > > +XENCONS_RING_IDX prod = _interface->out_prod; > > +constexpr auto ringsize = sizeof(_interface->out) - 1; >>> +while (true) { >>> +XENCONS_RING_IDX cons = _interface->out_cons; >>> >> +

Re: [PATCH 4/8] osv: aarch64: support processor::features()

2017-03-21 Thread Nadav Har&#x27;El
Hi, I cannot get this patch to apply cleanly after applying patches 1-3. Can you please send a new version of this patch? Thanks. -- Nadav Har'El n...@scylladb.com On Fri, Mar 3, 2017 at 11:45 AM, 'Sergiy Kibrik' via OSv Development < osv-dev@googlegroups.com> wrote: >

Re: [PATCH] OSv's Redis version update

2017-03-21 Thread Nadav Har&#x27;El
On Tue, Mar 21, 2017 at 4:05 PM, wrote: > I am mailing about OSv Redis. > > I have noticed in the download section http://osv.io/downloads/ that ova > for Redis contains quite old 0.24 version. > All our prepared images are old. I'm CC'ing Peka to consider if he wants to change that. You can bu

Re: [PATCH] Updated ec2-make-ami.py to boto3, added timers and allowed to specify location of img to create AMI from

2017-03-22 Thread Nadav Har&#x27;El
On Thu, Feb 23, 2017 at 3:54 PM, Waldemar Kozaczuk wrote: > New ec2-make-ami.py uses boto3 to interact with AWS. Also it logs time it > takes to execute > all steps involved in creating an AMI. It also accepts new parameter -i > that allows > to specify location of the OSv image file. > Hi, I kn

Re: [PATCH] OSv's Redis version update

2017-03-22 Thread Nadav Har&#x27;El
On Tue, Mar 21, 2017 at 5:50 PM, Nadav Har'El wrote: > > > On Tue, Mar 21, 2017 at 4:05 PM, wrote: > >> I am mailing about OSv Redis. >> >> I have noticed in the download section http://osv.io/downloads/ that ova >> for Redis contains quite old 0.24 ve

Re: [PATCH] OSv's Redis version update

2017-03-22 Thread Nadav Har&#x27;El
On Wed, Mar 22, 2017 at 11:47 AM, Nadav Har'El wrote: > > > On Tue, Mar 21, 2017 at 5:50 PM, Nadav Har'El wrote: > While redis 3.0.1 still seems to work correctly, redis 3.2.8 (which you > can get by trivially changing the version in apps/redis-memonly/GET) does > n

Re: [PATCH] Changed DHCP client logic to properly broadcast DHCPREQUEST during

2017-03-22 Thread Nadav Har&#x27;El
Thanks. Looks good to me. Justin, can you please also have a look? -- Nadav Har'El n...@scylladb.com On Wed, Mar 22, 2017 at 2:57 PM, Waldemar Kozaczuk wrote: > From: wkozaczuk > > The patch addressing issue #816 changed dhcp_mbuf::compose_request() > method to > make it

Re: [PATCH] Changed DHCP client logic to properly broadcast DHCPREQUEST during

2017-03-23 Thread Nadav Har&#x27;El
Thanks. I'm really not versed enough in the DHCP RFC to make much sense out of this. Waldemar, can you please review? Thanks. -- Nadav Har'El n...@scylladb.com On Thu, Mar 23, 2017 at 12:41 AM, Justin Cinkelj wrote: > The patch works OK for me, tested agains dnsmasq. >

Re: [PATCH] OSv's Redis version update

2017-03-23 Thread Nadav Har&#x27;El
On Wed, Mar 22, 2017 at 7:30 PM, wrote: > Hi Nadav, > > Thanks for your effort and such a quick response. Much appreciate it. > > I am more than happy to give that a go but will need a short guide from > you. Basically I have only downloaded your virtual appliance of redis and > it has worked as

Re: [PATCH] Changed DHCP client logic to properly broadcast DHCPREQUEST during

2017-03-26 Thread Nadav Har&#x27;El
On Fri, Mar 24, 2017 at 10:37 PM, Justin Cinkelj wrote: > If we agree I correctly interpreted the part of RFC in previous mail, that > patch should be included too? > BR Justin > Yes, thanks. I committed this too. -- You received this message because you are subscribed to the Google Groups "OS

Re: [PATCH] Generalize nodejs build to support recent versions (6.9.5 LTS and 7.5.0 latest)

2017-03-28 Thread Nadav Har&#x27;El
es between the different versions' patches should disappear. Rean, can you please fix that and also see my other comments, and submit a new patch? Thanks. > > On Monday, February 6, 2017 at 4:13:45 AM UTC-5, Nadav Har'El wrote: >> >> >> On Mon, Feb 6, 2017 at 10:27 AM

[PATCH] math: disable optimizations on files which gcc 4.8.4 miscompiles

2017-03-28 Thread Nadav Har&#x27;El
tions by a little bit, but hopefully they are not heavily used by performance- minded applications, anyway. Fixes #867. Signed-off-by: Nadav Har'El --- Makefile | 14 ++ 1 file changed, 14 insertions(+) diff --git a/Makefile b/Makefile index 5133d8e..ba84338 100644 --- a/M

Re: [PATCH] [Issue #857] Add assert and guard to prevent the next round of barrier-waits from starting before the previous round of barrier-waits completes

2017-04-03 Thread Nadav Har&#x27;El
Were you able to reproduce this problem - perhaps by reducing sleeping in the test case, or something? Some comments below. On Mon, Apr 3, 2017 at 4:30 AM, 'rean' via OSv Development < osv-dev@googlegroups.com> wrote: > Signed-off-by: Rean Griffith > --- > include/osv/latch.hh| 3 +++ > l

Re: [PATCH] dhcp: change requested hostname selection logic

2017-04-03 Thread Nadav Har&#x27;El
If I understand correctly, the patch from Waldemar Kozaczuk which I just applied makes this one unnecessary, and I shouldn't try to apply this. Right? -- Nadav Har'El n...@scylladb.com On Thu, Mar 30, 2017 at 4:29 PM, Justin Cinkelj wrote: > The old hostname (DNS name)

Re: [PATCH] command line: expand environ vars for runscript and REST commands

2017-04-03 Thread Nadav Har&#x27;El
On Wed, Mar 29, 2017 at 3:54 PM, Justin Cinkelj wrote: > When command is run via CLI (run.py -e "CMD"), the CMD string can contain > $KEY, and KEY will be replaced with corresponding value from environ. > The patch implements this also for commands run via REST or via runscript. > > Fixes #868 >

Re: [PATCH v2] [Issue #857] Add assert and a condition variable to prevent the next round of barrier-waits from starting before the previous round of barrier-waits completes

2017-04-06 Thread Nadav Har&#x27;El
orrect mess, I agree that it's better to fix it even of the cost of increasing the mess - and we can clear the mess later. -- Nadav Har'El n...@scylladb.com On Thu, Apr 6, 2017 at 8:42 AM, 'rean' via OSv Development < osv-dev@googlegroups.com> wrote: > Signed-o

Re: [PATCH v2] [Issue #857] Add assert and a condition variable to prevent the next round of barrier-waits from starting before the previous round of barrier-waits completes

2017-04-09 Thread Nadav Har&#x27;El
On Thu, Apr 6, 2017 at 10:58 AM, Nadav Har'El wrote: > > I also have a general worry that this code has become much more complex > than it really needs to be - for example do we really need three separate > mutexes (two in this code, one inside the latch) to implement a bar

[PATCH] reimplement pthread_barrier_*()

2017-04-09 Thread Nadav Har&#x27;El
e only a single mutex, and a single condition variable (actually, a waitqueue which is like a condition variable but does not require an additional internal mutex in its implementation). Signed-off-by: Nadav Har'El --- libc/pthread_barrier.cc | 117 +---

Re: [PATCH v2] [Issue #857] Add assert and a condition variable to prevent the next round of barrier-waits from starting before the previous round of barrier-waits completes

2017-04-09 Thread Nadav Har&#x27;El
On Sun, Apr 9, 2017 at 5:33 PM, Nadav Har'El wrote: > A third alternative to re-implementing from scratch or fixing this > latch-based implementation, could be to implement based on other building > blocks that OSv already has (and are better debugged than either "l

Re: [PATCH v2] [Issue #857] Add assert and a condition variable to prevent the next round of barrier-waits from starting before the previous round of barrier-waits completes

2017-04-12 Thread Nadav Har&#x27;El
On Tue, Apr 11, 2017 at 8:13 AM, Rean Griffith wrote: > Hi Nadav, > > I looked at your patch and it looks good. > > I tried running the tests I have been using locally to trigger hangs and > it passed - no hangs observed thus far after running a few hundred > repeated rounds with between 1 and 10

Re: [PATCH v2] [Issue #857] Add assert and a condition variable to prevent the next round of barrier-waits from starting before the previous round of barrier-waits completes

2017-04-12 Thread Nadav Har&#x27;El
On Wed, Apr 12, 2017 at 11:09 AM, Nadav Har'El wrote: > On Tue, Apr 11, 2017 at 8:13 AM, Rean Griffith > wrote: > >> Hi Nadav, >> >> I looked at your patch and it looks good. >> >> I tried running the tests I have been using locally to trigger hangs a

Re: Example of using virtio network interfaces from application code

2017-04-12 Thread Nadav Har&#x27;El
On Mon, Apr 10, 2017 at 1:05 AM, Rick Payne (Offshore) wrote: > Hi, > > Is there a good example that uses the virtio network interfaces direct? > ie. an application that uses ‘assign-net’ and talks directly to the network > interface code in OSv? > > I’m looking for a sample I can learn from. >

Re: Example of using virtio network interfaces from application code

2017-04-13 Thread Nadav Har&#x27;El
On Wed, Apr 12, 2017 at 8:36 PM, Dor Laor wrote: > We did hack memcache to get packets directly from the device. You can > search for this example, it might be good enough for you > > What Dor is referring to is https://github.com/vladzcloudius/osv-memcached (you can build it with "scripts/build

[PATCH] Fix SMP initialization of paravirtual KVM clock

2017-04-18 Thread Nadav Har&#x27;El
ost 0.3 seconds for 32 vcpus. However, this "stuck time" does not cause any real problems as code which needs functional clocks and preemptive multitasking will run later anyway. Signed-off-by: Nadav Har'El --- drivers/clock-common.hh | 2 +- drivers/clock-common.cc | 10

Re: OSv blog broken

2017-04-20 Thread Nadav Har&#x27;El
On Fri, Apr 14, 2017 at 3:12 PM, Waldek Kozaczuk wrote: > Hey, > > Can I get access to the blog github or wherever its content is stored so I > can fix it? > > Thanks, > Waldek > > Thanks to Pekka and Tzach, we finally found the "missing" blog repository and fixed the layout issue: It turns out

Re: Symbol lookup errors while building C++ source code

2017-04-23 Thread Nadav Har&#x27;El
On Sun, Apr 23, 2017 at 2:06 PM, Avi Kivity wrote: > It could be the new ABI, see https://gcc.gnu.org/ > onlinedocs/libstdc++/manual/using_dual_abi.html. > > > Try compiling your code with _GLIBCXX_USE_CXX11_ABI=0. > Indeed. Check out also commit 6a3bff38a281e65ee715bab4fadef63e0918f7d3 where we

Re: Symbol lookup errors while building C++ source code

2017-04-23 Thread Nadav Har&#x27;El
On Sun, Apr 23, 2017 at 4:23 PM, Rick Payne (Offshore) wrote: > > > On 23 Apr 2017, at 05:14, Nadav Har'El wrote: > > > > Pekka, another question we should ask ourselves is what is the plan with > Capstan, and more importantly, the binary OSv releases. The OSv v

Re: Java Spring-Boot Application on RAMFS

2017-04-25 Thread Nadav Har&#x27;El
Thanks. I opened https://github.com/cloudius-systems/osv/issues/871 to track this issue. -- Nadav Har'El n...@scylladb.com On Tue, Apr 25, 2017 at 12:42 PM, Boris Brankovic < brankovic.boris...@gmail.com> wrote: > Hi all, > > I am trying to test a Java Spring-Boot Applicati

[PATCH 1/2] Remove some dead code

2017-04-25 Thread Nadav Har&#x27;El
Remove some dead code (an ifdef'ed out static function which was never used) from fs/vfs/main.cc. Signed-off-by: Nadav Har'El --- fs/vfs/main.cc | 15 --- 1 file changed, 15 deletions(-) diff --git a/fs/vfs/main.cc b/fs/vfs/main.cc index 924bfad..44ae642 100644 --- a/fs/v

[PATCH 2/2] ramfs: support symbolic links

2017-04-25 Thread Nadav Har&#x27;El
mfs Fixes #871 Signed-off-by: Nadav Har'El --- scripts/mkbootfs.py | 20 +++- fs/ramfs/ramfs_vnops.cc | 44 fs/vfs/main.cc | 26 -- usr_nozfs.manifest.skel | 3 +-- 4 files changed, 80 in

Re: Java Spring-Boot Application on RAMFS

2017-04-25 Thread Nadav Har&#x27;El
image it may not work because of a silly limit we have in place on the size of the kernel (which includes the ram disk) - the error message will tell you how to fix it. Can you please give this patch a try and see how it works out for you? Thanks, Nadav. -- Nadav Har'El n...@scylladb.co

Re: [PATCH 2/2] ramfs: support symbolic links

2017-04-26 Thread Nadav Har&#x27;El
On Wed, Apr 26, 2017 at 11:53 AM, Benoît Canet wrote: > > > 2017-04-26 0:50 GMT+02:00 Nadav Har'El : > ramfs_rmdir(struct vnode *dvp, struct vnode *vp, char *name) > >> @@ -388,11 +424,11 @@ ramfs_rename(struct vnode *dvp1, struct vnode *vp1, >>

Re: HyperV/Azure: work in progress status

2017-04-26 Thread Nadav Har&#x27;El
On Thu, Apr 27, 2017 at 7:37 AM, Waldek Kozaczuk wrote: > > I am also thinking of changing my original plan. Instead of porting all > drivers first I will first port vmbus only and then work on implementing > hyperv::vmbus > and hyperv::hyperv_driver classes to make OSv at least boot on Hyper/V

Re: HyperV/Azure: work in progress status

2017-04-27 Thread Nadav Har&#x27;El
On Thu, Apr 27, 2017 at 11:37 AM, Avi Kivity wrote: > > > On 04/27/2017 07:37 AM, Waldek Kozaczuk wrote: > > Here are other issues where I am seeking advice: > >- *SYSCTL* in FreeBSD provides configuration management mechanism for >kernel and device drivers (https://www.freebsd.org/cgi/ >

Re: Java Spring-Boot Application on RAMFS

2017-04-27 Thread Nadav Har&#x27;El
On Thu, Apr 27, 2017 at 10:46 AM, Boris Brankovic < brankovic.boris...@gmail.com> wrote: > > Thank you very much for fixing this issue! The build command works fine > now. > > I just get an error if I want to start the unikernel with the > "run.py"-script. > > The error says: > OSv v0.24-327-gd6ca

Re: Java Spring-Boot Application on RAMFS

2017-04-27 Thread Nadav Har&#x27;El
On Thu, Apr 27, 2017 at 12:18 PM, Nadav Har'El wrote: > > On Thu, Apr 27, 2017 at 10:46 AM, Boris Brankovic < > brankovic.boris...@gmail.com> wrote: > >> >> Thank you very much for fixing this issue! The build command works fine >> now. >> >&g

Re: HyperV/Azure: work in progress status

2017-05-07 Thread Nadav Har&#x27;El
On Sun, May 7, 2017 at 9:09 AM, Waldek Kozaczuk wrote: > Hyper/V VMBUS seems be using inter processor interrupts delivered by > *Synthetic > Interrupt Controller (SynIC). * > > The BSD drivers use lapic_ipi_alloc() which per this patch description ( > https://reviews.freebsd.org/D2042) dynamical

Re: [PATCH osv-apps] Bump Node.js version to 6.10.3

2017-05-08 Thread Nadav Har&#x27;El
might not be necessary after I added support for nearbyint(). I also had several other reservations on that patch, which is why it wasn't committed. Did you also try more recent versions and failed? Or did you really want to run 6.10 in particular? -- Nadav Har'El n...@scylladb.com

Re: [PATCH osv-apps] Bump Node.js version to 6.10.3

2017-05-08 Thread Nadav Har&#x27;El
On Mon, May 8, 2017 at 2:48 PM, Nadav Har'El wrote: > Thanks. I committed this. > > In February, Rean Griffith sent patch titled > "Generalize > nodejs build to support recent versions (6.9.5 LTS and 7.5.0 latest)" which > enabled even later versions. He ended

Re: HyperV/Azure: work in progress status

2017-05-09 Thread Nadav Har&#x27;El
On Wed, May 10, 2017 at 1:54 AM, Waldek Kozaczuk wrote: > I also hoped it would be possible to boot simple "hello world" image on > Hyper/V without adding anything to OSv to support Hyper/V drivers. But > based on the experiments I conducted yesterday it looks like I will have to > add some minim

Re: HyperV/Azure: work in progress status

2017-05-10 Thread Nadav Har&#x27;El
On Wed, May 10, 2017 at 8:14 AM, Nadav Har'El wrote: > > > On one hand, tha't nice progress - you can see actual OSv code getting > printed on hyper-v :-) > On the other hand, sad that HPET is not supported as a fallback. I looked > at what Linux did when hyperv fir

Re: HyperV/Azure: work in progress status

2017-05-15 Thread Nadav Har&#x27;El
On Fri, May 12, 2017 at 10:26 PM, Waldek Kozaczuk wrote: > Given I am almost done porting the FreeBSD drivers code for Hyper/V (at > least the VMBus part) I have decided to proceed with the implementation of > the clock using Hyper/V time synchronization service. This will obviously > require put

[PATCH] Do not include libosv.so in Java module

2017-05-18 Thread Nadav Har&#x27;El
=ramfs (note the fs=ramfs, causing all the files to be included in the kernel executable) fails with strip: 'libosv.so': No such file This patch simply removes libosv.so from the java module. Nothing seems to rely on it. Signed-off-by: Nadav Har'El --- modules/java-base/u

[PATCH] build: allow easily increasing the maximum allowed kernel size

2017-05-18 Thread Nadav Har&#x27;El
er reading a certain length), and in Makefile (which verifies that the kernel isn't too large). Fixes #872. Signed-off-by: Nadav Har'El --- fastlz/lzloader.cc | 10 -- Makefile| 16 +--- arch/x64/boot16.S | 2 +- arch/x64/lzloa

Re: HyperV/Azure: work in progress status

2017-05-19 Thread Nadav Har&#x27;El
Hi, On Fri, May 19, 2017 at 7:52 AM, Waldek Kozaczuk wrote: > I finally managed to fully boot and execute simple C hello work program on > Hyper/V. > That's great! With the patch I sent yesterday allowing a kernel of any size, you should now be able to run any OSv image when built with fs=ramfs

Re: HyperV/Azure: work in progress status

2017-05-19 Thread Nadav Har&#x27;El
this as a "TODO" and only go back to it after you make the network (for example) work. -- Nadav Har'El n...@scylladb.com On Fri, May 19, 2017 at 6:03 PM, Waldek Kozaczuk wrote: > The essence of my changes is this new clock class - https://github.com/ > wkozaczuk/osv/bl

Re: HyperV/Azure: work in progress status

2017-05-19 Thread Nadav Har&#x27;El
On Fri, May 19, 2017 at 11:54 PM, Waldek Kozaczuk wrote: > What do you mean by "exit"? Is it because it calls a function? Would > inlining help? > "VMX" (virtual machine extensions) is Intel's hardware support for virtualization. What makes it efficient is that the guest code mostly runs normall

Re: [PATCH 1/3] Added subset of original FreeBSD driver code for Hyper/V.

2017-05-29 Thread Nadav Har&#x27;El
Hi, sorry for the belated review. There's a lot of stuff here. Do you need all of that just for the "hello world" example, or are you adding much of it in anticipation of the network/disk support later? On Fri, May 26, 2017 at 8:37 AM, Waldemar Kozaczuk wrote: > - added subset of original Free

Re: [PATCH 2/3] Ported subset of Hyper/V vmbus driver code (hyperv.cc) from FreeBSD to C++ and adapted where necessary to use OSv apis

2017-05-29 Thread Nadav Har&#x27;El
Looks mostly good. Some minor comments below. On Fri, May 26, 2017 at 8:37 AM, Waldemar Kozaczuk wrote: > Here is the list of specific changes: > - where required by C++ compiler applied appropriate C++ cast > (static_cast, reinterpret_cast, const_cast) > - where necessary replaced FreeBSD he

Re: [PATCH 3/3] Added ability to OSv boot logic to detect if running of Hyper/V and implemented Hyper/V specific clock.

2017-05-29 Thread Nadav Har&#x27;El
Looks great, thanks. Some minor comments below. On Fri, May 26, 2017 at 8:37 AM, Waldemar Kozaczuk wrote: > These changes are enough to allow execution of simple OSv apps that do NOT > need > networking nor storage access. Excellent! > The image built using the command below should > success

Re: OSv with openjdk-1.8.0 proposal/RFC

2017-06-08 Thread Nadav Har&#x27;El
On Thu, Jun 8, 2017 at 7:13 AM, Justin Cinkelj wrote: > Gasper in CC original console output: > OSv v0.24-364-g3cb3ccc > eth0: 10.32.3.20 > java.so: Starting JVM app using: io/osv/isolated/RunIsolatedJvmApp > java.so: Setting Java system classloader to IsolatingOsvSystemClassLoader > and logging

[PATCH] Fix dladdr() return value

2017-06-08 Thread Nadav Har&#x27;El
returned fname and base to the object's values when the address belongs to this object - even if not to any known symbol, because we need this behavior in dladdr(). Fixes #878, but openjdk8-fedora+tomcat still does not work, because of yet another bug. Signed-off-by: Nadav Har'El --- core/el

[PATCH] stdio: fix fread() from block device

2017-06-13 Thread Nadav Har&#x27;El
locks once for the entire readv() scattered buffer, as expected. So we don't need this workaround, which can only hurt performance, and in the present case, prevent fread() from working on a block device. Fixes #877 Signed-off-by: Nadav Har'El --- tests/tst-fread

Re: [PATCH] stdio: fix fread() from block device

2017-06-13 Thread Nadav Har&#x27;El
On Tue, Jun 13, 2017 at 5:54 PM, Justin Cinkelj wrote: > Patch seems to work, please apply. > > Instead of assert(), libcdio now complains if I ask to extract invalid > filename. > If you tried to read a non-existant file, it should have also failed this way previously, and not with an assert.

Re: [PATCH] calloc: allow 0-sized allocation

2017-06-14 Thread Nadav Har&#x27;El
On Wed, Jun 14, 2017 at 4:56 PM, Justin Cinkelj wrote: > The calloc(nmemb, size=0) failed due to division by 0 in > "std::numeric_limits::max() / size". > Fix this by checking for 0 value before division. > > Included is also a small test case for calloc and memset. > > Signed-off-by: Justin Cink

Re: [PATCH 3/3] Added ability to OSv boot logic to detect if running of Hyper/V and implemented Hyper/V specific clock.

2017-06-21 Thread Nadav Har&#x27;El
Hi, sorry about the delayed response... On Wed, May 31, 2017 at 6:52 AM, Waldek Kozaczuk wrote: > > bool > >> -hyperv_is_timecount_available() { >>> +hyperv_is_timecount_available(void) { >>> return (hyperv_features & CPUID_HV_MSR_TIME_REFCNT); >>> >> >> This function needs to run after "h

Re: [PATCH 3/3] Added ability to OSv boot logic to detect if running of Hyper/V and implemented Hyper/V specific clock.

2017-06-21 Thread Nadav Har&#x27;El
in my last response which I would >>> like you to answer before I can send new updated patch. >>> >>> On Tuesday, May 30, 2017 at 11:52:32 PM UTC-4, Waldek Kozaczuk wrote: >>>> >>>> Please see my answers below. >>>> >>>> On Mon,

Re: [PATCH 2/3] Ported subset of Hyper/V vmbus driver code (hyperv.cc) from FreeBSD to C++ and adapted where necessary to use OSv apis

2017-06-25 Thread Nadav Har&#x27;El
Hi, sorry about the delay. Hopefully I found the right questins now: On Wed, May 31, 2017 at 6:29 AM, Waldek Kozaczuk wrote: > Please see my answers below. Overall I correct what needed and I will send > the updated patch. > > > >>> -static bool >>> +bool >>> hyperv_identify(void) >>> { >>>

Re: Watch growing log file

2017-06-26 Thread Nadav Har&#x27;El
On Thu, Jun 22, 2017 at 7:51 AM, Waldek Kozaczuk wrote: > My objective is to push a growing application log file from OSv instance > into ELK stack (elasticsearch, logstash, kibana) or Splunk. And I am > looking for best way to do it. > > Here are the alternatives: > >1. Externally (outside o

[PATCH] Support the TCP_CORK socket option

2017-06-29 Thread Nadav Har&#x27;El
k" in the reciever). When TCP_CORK is used and released after the second write, it gets sent immediately. We saw these 100ms "hangs" of TCP sessions in real benchmarks of nginx, because its usage of TCP_CORK was silently ignored. Fixes #883. Signed-off-by: Nadav Har'El --- bsd/sys/

[PATCH] Also support TCP_NODELAY socket option

2017-06-29 Thread Nadav Har&#x27;El
same test for TCP_CORK, it's just that with TCP_NODELAY we don't need to "uncork" - each small write sends its data immediately so right after the second write, the reader can almost immediately read all the data). Signed-off-by: Nadav Har'El --- bsd/sys/compat/l

Re: Create base packages using capstan

2017-07-04 Thread Nadav Har&#x27;El
On Fri, Jun 30, 2017 at 10:43 PM, Waldek Kozaczuk wrote: > I am not sure if this is the best forum as it relates to the MikelAngelo > capstan. > I think it is, because all the relevant Mikelangelo developers are on this list, and anyway the "original" Capstan is more-or-less dead, and it's good

<    1   2   3   4   5   6   7   8   9   10   >