Re: [osv-dev] Shrinking kernel

2020-05-26 Thread Waldek Kozaczuk
On Tuesday, May 26, 2020 at 4:26:09 AM UTC-4, Nadav Har'El wrote: > > On Sun, May 17, 2020 at 7:59 AM Waldek Kozaczuk > wrote: > >> One of the things, I would like to tackle for the next release is making >> the loader.elf smaller. The primary motivation is to lower memory >> utilization. But

Re: [osv-dev] Using PERCPU in application or module

2020-05-26 Thread Wonsup Yoon
Great! OSV_ELF_MLOCK_OBJECT seems very useful. Thanks. 2020년 5월 26일 화요일 오후 4시 25분 57초 UTC+9, Nadav Har'El 님의 말: > > On Tue, May 26, 2020 at 9:41 AM Wonsup Yoon > wrote: > >> Actually, I used preempt_lock to prevent data races. >> If two concurrent threads in a core access same per-cpu

Re: [osv-dev] Using PERCPU in application or module

2020-05-26 Thread Nadav Har'El
On Tue, May 26, 2020 at 4:22 AM Wonsup Yoon wrote: > Thank you for the response. > > Yes, dynamic_percpu is perfect for my purpose. > > However, I encountered another issue. > > If I use dynamic_percpu with preempt-lock (I think it is very common > pattern), it abort due to assertion failed. >

Re: [osv-dev] Using PERCPU in application or module

2020-05-26 Thread Wonsup Yoon
Actually, I used preempt_lock to prevent data races. If two concurrent threads in a core access same per-cpu variable, I think we still need preempt lock. example) counter's initial value: 0 CPU 0 Thread AA_local = counter + 1 (A_local = 1)

Re: [osv-dev] [PATCH 2/3] lzloader: fix memset() implementation

2020-05-26 Thread Rick Payne
On Mon, 2020-05-25 at 09:15 +0300, Nadav Har'El wrote: > > Do you mean > https://github.com/cloudius-systems/osv/commit/d52cb12546ff2acd5255a2ac8897891e421f07dc > which just turned off optimization? Yes. > At the time, I suggested the memset() fix for #913, because seemed to > me like an

Re: [osv-dev] Using PERCPU in application or module

2020-05-26 Thread Nadav Har'El
On Tue, May 26, 2020 at 9:41 AM Wonsup Yoon wrote: > Actually, I used preempt_lock to prevent data races. > If two concurrent threads in a core access same per-cpu variable, I think > we still need preempt lock. > This is true - if you have two threads in the same core that access the same

Re: [osv-dev] Librarization/Modularization

2020-05-26 Thread Nadav Har'El
On Tue, May 26, 2020 at 8:29 AM Waldek Kozaczuk wrote: > Hi, > > I am going to be sending proper "Next Release Proposal" email later this > week > Thanks for doing this! > (or next) and "Librarization/Modularization" will be a key part of it. > Currently, OSv kernel provides quite a

Re: [osv-dev] Shrinking kernel

2020-05-26 Thread Nadav Har'El
On Sun, May 17, 2020 at 7:59 AM Waldek Kozaczuk wrote: > One of the things, I would like to tackle for the next release is making > the loader.elf smaller. The primary motivation is to lower memory > utilization. But at the same time, I would also like to keep the kernel > (the release version)