search for: clone_vm

Displaying 20 results from an estimated 27 matches for "clone_vm".

2010 Jan 01
1
[LLVMdev] Can Interpreter handle clone() call (with CLONE_VM flag)?
Dear all, May I know whether Interpreter in llvm-2.6 can handle clone() call (with CLONE_VM flag)? Another small question is: since JIT only invokes the main() function in a program once, and does not have control to the execution while main() is running, what is the benefit of using JIT? -- Regards, Heming Cui -------------- next part -------------- An HTML attachment was scrubbed...
2011 Nov 26
2
Bug#646987: /usr/bin/xinit: xinit fails with xkbcomp could not be invoked
...current process has ->mm; if not, return 0 (effectively copying the "no mm" status into the new task_struct, is this true?). Presumably 0 return is "success", because failure returns are things like -ENOMEM. If we haven't returned, then we check if clone_flags includes CLONE_VM; if so, we set our mm = the current process' ->mm, set some elements in ->mm and ->tsk and return. If clone_flags does not include CLONE_VM, we try to set mm = dup_mm(tsk) which presumably means we are trying to duplicate the ->mm of the task being created?!? and if that fail...
2024 Mar 15
1
Using multiple temporary indexes during updates
...t sense to do at the same time as implementing https://trac.xapian.org/ticket/444 ). Incidentally, for the "fork() on a large process is slow" bit at the end, posix_spawn() may help assuming it's flexible enough to do what you want. The glibc implementation calls "clone(2) with CLONE_VM and CLONE_VFORK flags". Cheers, Olly
2023 May 05
1
[PATCH v11 8/8] vhost: use vhost_tasks for worker threads
On Fri, May 5, 2023 at 6:40?AM Nicolas Dichtel <nicolas.dichtel at 6wind.com> wrote: > > Is this an intended behavior? > This breaks some of our scripts. It doesn't just break your scripts (which counts as a regression), I think it's really wrong. The worker threads should show up as threads of the thing that started them, not as processes. So they should show up in
2023 May 05
2
[PATCH v11 8/8] vhost: use vhost_tasks for worker threads
...l/vhost_task.c index b7cbd66f889e..3700c21ea39d 100644 --- a/kernel/vhost_task.c +++ b/kernel/vhost_task.c @@ -75,7 +78,8 @@ struct vhost_task *vhost_task_create(int (*fn)(void *), void *arg, const char *name) { struct kernel_clone_args args = { - .flags = CLONE_FS | CLONE_UNTRACED | CLONE_VM, + .flags = CLONE_FS | CLONE_THREAD | CLONE_VM | + CLONE_UNTRACED, .exit_signal = 0, .fn = vhost_task_fn, .name = name,
2023 May 22
3
[PATCH 0/3] vhost: Fix freezer/ps regressions
The following patches made over Linus's tree fix the 2 bugs: 1. vhost worker task shows up as a process forked from the parent that did VHOST_SET_OWNER ioctl instead of a process under root/kthreadd. This was causing breaking scripts. 2. vhost_tasks didn't disable or add support for freeze requests. The following patches fix these issues by making the vhost_task task a thread under the
2023 May 22
2
[PATCH 3/3] fork, vhost: Use CLONE_THREAD to fix freezer/ps regression
...E, NULL); > kfree(vtsk); > } > EXPORT_SYMBOL_GPL(vhost_task_stop); > @@ -75,13 +66,14 @@ struct vhost_task *vhost_task_create(int (*fn)(void *), void *arg, > const char *name) > { > struct kernel_clone_args args = { > - .flags = CLONE_FS | CLONE_UNTRACED | CLONE_VM, > + .flags = CLONE_FS | CLONE_UNTRACED | CLONE_VM | > + CLONE_THREAD | CLONE_SIGHAND, > .exit_signal = 0, > .fn = vhost_task_fn, > .name = name, > .user_worker = 1, > .no_files = 1, > - .ignore_signals = 1, > + .block_signals = 1, > }; >...
2020 Aug 29
0
[klibc:master] ia64: Fix invalid memory access in vfork
...4/vfork.S | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/usr/klibc/arch/ia64/vfork.S b/usr/klibc/arch/ia64/vfork.S index 7e76a714..e513188b 100644 --- a/usr/klibc/arch/ia64/vfork.S +++ b/usr/klibc/arch/ia64/vfork.S @@ -26,16 +26,12 @@ vfork: mov r15=__NR_clone mov out0=CLONE_VM|CLONE_VFORK|SIGCHLD mov out1=0 - ;; break 0x100000 // Do the syscall - ;; - addl r15=0,r1 cmp.eq p7,p6 = -1,r10 ;; - ld8 r14=[r15] +(p7) movl r14 = errno ;; (p7) st4 [r14]=r8 - ;; (p7) mov r8=-1 br.ret.sptk.many b0 .endp vfork
2024 Mar 15
1
Using multiple temporary indexes during updates
Hi, I have been playing at converting the index update stage of the Recoll indexer to use multiple temporary indexes and a final merge. This yields an improvement factor of almost 3 (on my quad-core CPU), for the total indexing time for "easy" files like HTML pages. This is nice (!) and I wanted to share my admiration for the "compact()" method. If someone is interested in a
2023 Jun 01
4
[PATCH 1/1] fork, vhost: Use CLONE_THREAD to fix freezer/ps regression
...r must fire it up * through vhost_task_start(). */ -struct vhost_task *vhost_task_create(int (*fn)(void *), void *arg, +struct vhost_task *vhost_task_create(bool (*fn)(void *), void *arg, const char *name) { struct kernel_clone_args args = { - .flags = CLONE_FS | CLONE_UNTRACED | CLONE_VM, + .flags = CLONE_FS | CLONE_UNTRACED | CLONE_VM | + CLONE_THREAD | CLONE_SIGHAND, .exit_signal = 0, .fn = vhost_task_fn, .name = name, .user_worker = 1, .no_files = 1, - .ignore_signals = 1, }; struct vhost_task *vtsk; struct task_struct *tsk; -- 2.25.1
2009 Dec 31
0
[LLVMdev] How does JIT/lli work with bc file?
On Wed, Dec 30, 2009 at 7:53 PM, Heming Cui <heming at cs.columbia.edu> wrote: > Dear all, >      I hope you enjoy your christmas! Recently I started to play lli with > bc. I found that the lli only calls the main() function in bc file and then > does nothing before the main() function returns, which means that the > JIT::runFunction() function is involved only once with the
2006 Jun 26
0
[klibc 25/43] ia64 support for klibc
...at wildopensource.com> + * + */ + +/* This syscall is a special case of the clone syscall */ +#include <asm/unistd.h> +#include <asm/signal.h> +#include <klibc/archsys.h> + +/* These are redefined here because linux/sched.h isn't safe for + * inclusion in asm. + */ +#define CLONE_VM 0x00000100 /* set if VM shared between processes */ +#define CLONE_VFORK 0x00004000 /* set if parent wants the child to wake it up on exit */ + +/* pid_t vfork(void) */ +/* Implemented as clone(CLONE_VFORK | CLONE_VM | SIGCHLD, 0) */ + + .align 32 + .proc vfork + .global vfork +vfork: + alloc r2...
2023 Jun 02
2
[PATCH 1/1] fork, vhost: Use CLONE_THREAD to fix freezer/ps regression
Hi Mike, sorry, but somehow I can't understand this patch... I'll try to read it with a fresh head on Weekend, but for example, On 06/01, Mike Christie wrote: > > static int vhost_task_fn(void *data) > { > struct vhost_task *vtsk = data; > - int ret; > + bool dead = false; > + > + for (;;) { > + bool did_work; > + > + /* mb paired w/
2009 Dec 31
3
[LLVMdev] How does JIT/lli work with bc file?
Dear all, I hope you enjoy your christmas! Recently I started to play lli with bc. I found that the lli only calls the main() function in bc file and then does nothing before the main() function returns, which means that the JIT::runFunction() function is involved only once with the main() function in bc file. If this was true, then lli does not have any control to the execution of program.
2013 Oct 09
0
[PATCH 1/1] Porting klibc to AArch64
...e}\n"; - } 1; diff --git a/usr/klibc/arch/aarch64/vfork.S b/usr/klibc/arch/aarch64/vfork.S index 378098c..23869d3 100644 --- a/usr/klibc/arch/aarch64/vfork.S +++ b/usr/klibc/arch/aarch64/vfork.S @@ -13,10 +13,35 @@ .globl vfork .balign 8 vfork: - mov x0, #0x4111 /* CLONE_VM | CLONE_VFORK | SIGCHLD */ - mov x1, sp - cmn x0, #4095 - b.cs 1f - RET + /* Prepare for the system call */ + /* 1. Push the function pointer and argument location + on to the child process stack */ + /* 2. Gather the Flags */ + /* New sp is...
2014 Mar 11
4
[PATCH] add mips64 support
...me})\n"; + close(OUT); +} + +1; diff --git a/usr/klibc/arch/mips64/vfork.S b/usr/klibc/arch/mips64/vfork.S new file mode 100644 index 0000000..9aa955a --- /dev/null +++ b/usr/klibc/arch/mips64/vfork.S @@ -0,0 +1,15 @@ +#include <machine/asm.h> +#include <asm/unistd.h> + +#define CLONE_VM 0x00000100 +#define CLONE_VFORK 0x00004000 +#define SIGCHLD 18 + + .set noreorder + +LEAF(vfork) + li a0, CLONE_VFORK | CLONE_VM | SIGCHLD + li a1, 0 + j __syscall_common + li v0, __NR_clone + END(vfork) -- 1.8.3.4 (Apple Git-47)
2019 Feb 02
2
[PATCH 1/2] ia64: Fix invalid memory access in vfork
...a64/vfork.S | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/usr/klibc/arch/ia64/vfork.S b/usr/klibc/arch/ia64/vfork.S index 7e76a71..e513188 100644 --- a/usr/klibc/arch/ia64/vfork.S +++ b/usr/klibc/arch/ia64/vfork.S @@ -26,16 +26,12 @@ vfork: mov r15=__NR_clone mov out0=CLONE_VM|CLONE_VFORK|SIGCHLD mov out1=0 - ;; break 0x100000 // Do the syscall - ;; - addl r15=0,r1 cmp.eq p7,p6 = -1,r10 ;; - ld8 r14=[r15] +(p7) movl r14 = errno ;; (p7) st4 [r14]=r8 - ;; (p7) mov r8=-1 br.ret.sptk.many b0 .endp vfork -- 1.8.5.3
2006 Jun 26
2
[klibc 28/43] mips support for klibc
...ose(OUT); +} + +1; diff --git a/usr/klibc/arch/mips/vfork.S b/usr/klibc/arch/mips/vfork.S new file mode 100644 index 0000000..f9f035b --- /dev/null +++ b/usr/klibc/arch/mips/vfork.S @@ -0,0 +1,16 @@ +#include <asm/asm.h> +#include <asm/regdef.h> +#include <asm/unistd.h> + +#define CLONE_VM 0x00000100 +#define CLONE_VFORK 0x00004000 +#define SIGCHLD 18 + + .set noreorder + +LEAF(vfork) + li a0, CLONE_VFORK | CLONE_VM | SIGCHLD + li a1, 0 + j __syscall_common + li v0, __NR_clone + END(vfork)
2004 Apr 28
1
Segmentation Fault when using dig, nslookup, host...
...= 0x80776e8 brk(0) = 0x80776e8 brk(0x8078000) = 0x8078000 mmap2(NULL, 8392704, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x4044d000 mprotect(0x4044d000, 4096, PROT_NONE) = 0 clone(child_stack=0x40c4db08, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID|CLONE_DETACHED, parent_tidptr=0x40c4dbf8, {entry_number:0, base_addr:0x40c4dbb0, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, usea...
2008 Aug 24
2
Unusual bug in glusterfsd
...= -1 EBADF (Bad file descriptor) > close(-1) = -1 EBADF (Bad file descriptor) > mmap2(NULL, 8392704, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb75c4000 > mprotect(0xb75c4000, 4096, PROT_NONE) = 0 > clone(child_stack=0xb7dc44c4, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0xb7dc4bd8, {entry_number:6, base_addr:0xb7dc4b90, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}, child_tidp...