thread concurrent file operation

2013-01-29 Thread Karaoui mohamed lamine
Hello, I was looking at how a syscall read/write was done, and i found this : loff_t pos = file_pos_read(f.file); ret = vfs_read(f.file, buf, count, &pos); file_pos_write(f.file, pos); fdput(f); ... My questions are : Where did the locking go? I would have imaginated some

Re: thread concurrent file operation

2013-01-29 Thread Karaoui mohamed lamine
2013/1/29 Tobias Boege > On Tue, 29 Jan 2013, Karaoui mohamed lamine wrote: > > Hello, > > > > I was looking at how a syscall read/write was done, and i found this : > > > > > >loff_t pos = file_pos_read(f.file); > >ret = vfs_read(f.f

Re: How to make a bootable hard disk image?

2013-02-01 Thread Karaoui mohamed lamine
While on subject i would to ask a question : > Usually, I invoke it this way: > > qemu -kernel /tmp/kernel-image -initrd /tmp/initrd -hda /tmp/guest.img > > Where can we found the "guest.img", or more exactly what to put in it ? I suppose a distrubition ? Is there any small distribution, maybe

Re: thread concurrent file operation

2013-02-07 Thread Karaoui mohamed lamine
Tahnks guys! 2013/1/30 Karaoui mohamed lamine > thanks, i think i get it. > > 2013/1/30 > > On Tue, 29 Jan 2013 20:16:26 +0100, you said: >> >> > Actually my question is : >> > Does POSIX specifies the fact that we need to use "lockf" to be abl

Re: thread concurrent file operation

2013-02-07 Thread Karaoui mohamed lamine
;f_u.fu_list); > atomic_long_set(&f->f_count, 1); > rwlock_init(&f->f_owner.lock); > spin_lock_init(&f->f_lock); > eventpoll_init_file(f); > /* f->f_version: 0 */ > > > On Thu, Feb 7, 2013 at 4:44 PM, Karaoui mo

Re: How to measure the RAM read/write performance

2013-02-27 Thread Karaoui mohamed lamine
2013/2/27 sandeep kumar > >>I am not sure but what if you make the variable as a volatile? > Hey i tried. But still is showing the same time for int & volatile int. > > "volatile" only say to the compiler to not put the variable in a register. Could i ask why does you want to mesure the speed of

Re: How to measure the RAM read/write performance

2013-02-27 Thread Karaoui mohamed lamine
ope i helped. regards. > > On Wed, Feb 27, 2013 at 2:30 PM, Karaoui mohamed lamine < > mohar...@gmail.com> wrote: > >> >> >> 2013/2/27 sandeep kumar >> >>> >>I am not sure but what if you make the variable as a volatile? >>> He

Re: code location where memory for page structures is allocated.

2014-06-24 Thread Karaoui mohamed lamine
mm/page_alloc.c AFAICC it's memmap_init_zone that initialize all pfns of a zone to default values (setting the pages as reserved). Note that for the page structures we don't use the standard memory allocators (kmalloc, vmalloc, etc), we simply calculate the amount of memory that all the structure

Re: physical memory userspace/kernel split on Linux x86-64

2015-05-27 Thread Karaoui mohamed lamine
2015-05-27 3:12 GMT+02:00 Le Tan : > Hi, > Is there an explict split between userspace and kernel in physical > memory on Linux x86-64? That is, given a physical address, can I tell > whether this address is from userspace or not? > No. The same physical address can be used by both the kernel an

migrate_pages internals: lazy copy

2018-01-19 Thread Karaoui mohamed lamine
Hi list, Does the "migrate_pages" syscall migrate memory pages in a *lazy* manner? if not, is there another syscall or patch that does it? Regards, ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/li

Re: migrate_pages internals: lazy copy

2018-01-19 Thread Karaoui mohamed lamine
tables at the kernel level... Regards, 2018-01-19 14:26 GMT-05:00 : > On Fri, 19 Jan 2018 13:57:18 -0500, Karaoui mohamed lamine said: > > > > Does the "migrate_pages" syscall migrate memory pages in a *lazy* manner? > > if not, is there another syscall o

ULIMIT: limiting user virtual address space (stack inluded)

2019-05-02 Thread Karaoui mohamed lamine
Hi all, According to the man page of "ulimit", it is possible to limit the virtual address space of a user process: https://ss64.com/bash/ulimit.html To limit the virtual address space to 2 GB: $ ulimit -SH -v 1048576 However, it seems that "stack" allocation ignores this limit (I tried with both

Best way to debug an invalid opcode

2020-03-19 Thread Karaoui mohamed lamine
Hi list, I am currently encountering a kernel oops that indicate an "invalid opcode: [#1] SMP" I am working on this project https://github.com/GiantVM/Linux-DSM The full log of the bug can be found here: https://github.com/GiantVM/Linux-DSM/pull/3 (at the end) Here is a snippet of the log:

Re: Best way to debug an invalid opcode

2020-03-19 Thread Karaoui mohamed lamine
Thank you Valdis for the quick response. Noted, I will see with the developer if he can still create a branch to document his modifications... On Thu, Mar 19, 2020, 10:54 AM Valdis Klētnieks wrote: > On Thu, 19 Mar 2020 10:22:25 +0100, Karaoui mohamed lamine said: > > > I