Re: copy offload (copy_file_range) and sendfile()

2016-03-21 Thread Manoj Nayak
1. sendfile() and splice uses temporary buffer in terms of pipe. do_splice_direct(in.file, , out.file, _pos, count, fl) -> splice_direct_to_actor(struct file *in, struct splice_desc *sd, splice_direct_actor *actor) http://lxr.free-electrons.com/source/fs/splice.c#L602 default_file_splice_read()

Re: Attach my own pid

2016-03-21 Thread Pranay Srivastava
On Mon, Mar 21, 2016 at 4:34 PM, Nitin Varyani wrote: > struct task_struct { > volatile long state; > void *stack; > ... > pid_t pid; > ... > } > You mean to say that just mapping the pid_t pid will do the job. Does the > linux kernel not store pid somewhere else while

Re: "kdumpbase" dracut module

2016-03-21 Thread Freeman Zhang
On 3/21/16 9:55 PM, Ronit Halder wrote: > Thanks for helping > > So, this module is used to dump the crash kernel. > Am I right? > If not then can you explain how kdump kernel calls the makedumpfile? > You are absolutely right Ronit. By the time the second kernel is booted, this module will

Get sk PID from netfilter target

2016-03-21 Thread Sargun Dhillon
I'm attempting to set the mark of a packet based on the PID it was originated from in the kernel. I came up with the following code as I was trying to work through things, and I had setup the rule on the OUTPUT chain: static unsigned int static unsigned int pidmark_tg(struct sk_buff *skb, const

Re: Linux Kernel Group Scheduling Feature of CFS

2016-03-21 Thread Ruben Safir
On 03/21/2016 12:42 PM, SUNITA wrote: > Hello, > I want to test the properties of CFS scheduler on a beaglebone. > This is extremely documented and a subject of nearly every graduate school and undergrad OS class and thesis. I don't think your understanding how it works and I suggest you

Re: "kdumpbase" dracut module

2016-03-21 Thread Ronit Halder
Thanks for helping So, this module is used to dump the crash kernel. Am I right? If not then can you explain how kdump kernel calls the makedumpfile? ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org

Re: "kdumpbase" dracut module

2016-03-21 Thread Dave Young
On 03/19/16 at 12:59pm, Ronit Halder wrote: > I want to know what is the job of "kdumpbase" dracut module. Suppose you are using Fedora or RHEL, it is a out of tree module for creating kdump initramfs. Fedora package kexec-tools will install it to dracut module directory. Thanks Dave

PR Value in the top command

2016-03-21 Thread Vishwas Srivastava
Hi All, i was trying to understand the the meaning of the PR field in the "top" command. PR field is the kernel notion of importance of a task. It is loosely coupled with the "nice" value, which is a user-space concept. Roughly they are related with.. PR=20+nice (-20<= nice <=19)

Re: Attach my own pid

2016-03-21 Thread Nitin Varyani
struct task_struct { volatile long state; void *stack; ... *pid_t pid;* ... } You mean to say that just mapping the *pid_t pid* will do the job. Does the linux kernel not store pid somewhere else while forking a child? On Mon, Mar 21, 2016 at 4:18 PM, Pranay Srivastava wrote:

Re: Attach my own pid

2016-03-21 Thread Nitin Varyani
A representative process, that is, a process without any user stack, register values, PC, etc, with *"pid" *is maintained at the master node. Now, the process which was migrated to a remote node, in this example Computer 2, and having process id *"pid", *decides to fork(). It is a system call and

Re: Attach my own pid

2016-03-21 Thread Nitin Varyani
.Continued That is, if kernel at Computer 2 finds that pid of a process requesting a system call is 1500, the request is forwarded to slave daemon which in turn contacts with the master daemon. Master daemon requests the kernel for the system call and sends the result back to slave daemon.

Re: Attach my own pid

2016-03-21 Thread Nitin Varyani
I am trying to create a distributed pid space. 0 to 2000 Computer 1 2001 to 4000 Computer 2 4001 to 6000 Computer 3 and so on... I am running a master user-level process at Computer 1 which sends a process context like code, data, registers, PC, etc as well as *"pid"* to slave processes running

Re: Is it possible to turn off the gcc optimization when compiling kernel?

2016-03-21 Thread Nicholas Mc Guire
On Sun, Mar 20, 2016 at 02:46:41PM +0800, Hao Lee wrote: > Hi, > When I am debugging the linux kernel, I find that the execution > sequence of some code is very strange. I think I need to turn off gcc > optimization by changing "-O2" to "-O0". But I encounter many errors. > So, I want to know is

Re: Can interrupt be missed between interrupt disable/enable window?

2016-03-21 Thread Crazyiop
Hi, When interrupt are globally disabled, interrupt are still detected and their flag set by their specific hardware circuit. It's only their immediat processing that are disabled. After reenabling interrupt, they will be treated right away, as their flag are still set. it would looks like

Re: add_disk() make my driver's initialisation, thus kernel stall.

2016-03-21 Thread 张云
Maybe I had misunderstood your meaning. You are meaning I have assign 0 to my device major number? The major variable is reassigned by the kernel in blkplay_init function. http://stackoverflow.com/questions/13518404/add-disk-hangs-on-insmod

Re: Can interrupt be missed between interrupt disable/enable window?

2016-03-21 Thread Chetan Nanda
On Mon, Mar 21, 2016 at 12:41 PM, Vishwas Srivastava wrote: > Kernel code heavily uses the spinlock primitives > spin_lock_irqsave/restore plus local interrupt disabling/ enabling, all > across the code. > Is there a possibility that the interrupts might get > missed in

Can interrupt be missed between interrupt disable/enable window?

2016-03-21 Thread Vishwas Srivastava
Kernel code heavily uses the spinlock primitives spin_lock_irqsave/restore plus local interrupt disabling/ enabling, all across the code. Is there a possibility that the interrupts might get missed in this small window disable interrupts . .

Re: Attach my own pid

2016-03-21 Thread Valdis . Kletnieks
On Mon, 21 Mar 2016 10:33:44 +0530, Nitin Varyani said: > Sub-task 1: Until now, parent process cannot control the pid of the forked > child. A pid gets assigned as a sequential number by the kernel at the time > the process is forked . I want to modify kernel in such a way that parent > process

kernel_thread() causes segfault

2016-03-21 Thread Shashank Khasare
Hi, I want to write a new syscall in which caller process would create kernel thread which shares the process address space, file descriptor table, parent pid etc. The new kernel thread would be clone of current thread but it would never execute any userspace code. The kernel_thread() function