Re: Evicting Anonymous pages.

2011-09-27 Thread rohan puri
On Tue, Sep 27, 2011 at 11:56 PM, Prateek Sharma wrote: > On Tue, Sep 27, 2011 at 11:42 PM, Mulyadi Santosa > wrote: > > Hi :) > > > > On Wed, Sep 28, 2011 at 00:14, Prateek Sharma > wrote: > >> Hello everyone, > >> I am trying to understand the kernel page frame reclaiming > >> mechanism, but

Re: Prevent a process from opening a file more than once

2011-09-27 Thread Michael Blizek
Hi! On 21:41 Tue 27 Sep , Venkatram Tummala wrote: > On Tue, Sep 27, 2011 at 9:19 PM, rohan puri wrote: ... > > in device_open() -> > > > > if(var) > > return -EBUSY > > var++ > > > > & > > > > in device_release() -> > > > > var-- > > > > > > I think this should do the job. > > > This w

Re: Prevent a process from opening a file more than once

2011-09-27 Thread rohan puri
On Wed, Sep 28, 2011 at 10:11 AM, Venkatram Tummala wrote: > On Tue, Sep 27, 2011 at 9:19 PM, rohan puri wrote: > >> >> >> On Wed, Sep 28, 2011 at 6:17 AM, Venkatram Tummala < >> venkatram...@gmail.com> wrote: >> >>> On Tue, Sep 27, 2011 at 5:40 PM, Jeff Haran wrote: >>> From: kerne

Re: Prevent a process from opening a file more than once

2011-09-27 Thread Venkatram Tummala
On Tue, Sep 27, 2011 at 9:19 PM, rohan puri wrote: > > > On Wed, Sep 28, 2011 at 6:17 AM, Venkatram Tummala > wrote: > >> On Tue, Sep 27, 2011 at 5:40 PM, Jeff Haran wrote: >> >>> >>> >>> From: kernelnewbies-boun...@kernelnewbies.org >>> [mailto:kernelnewbies-boun...@kernelnewbies.org] On Behalf

Re: Prevent a process from opening a file more than once

2011-09-27 Thread rohan puri
On Wed, Sep 28, 2011 at 6:17 AM, Venkatram Tummala wrote: > On Tue, Sep 27, 2011 at 5:40 PM, Jeff Haran wrote: > >> >> >> From: kernelnewbies-boun...@kernelnewbies.org >> [mailto:kernelnewbies-boun...@kernelnewbies.org] On Behalf Of Venkatram >> Tummala >> Sent: Tuesday, September 27, 2011 5:31 P

Re: Kernel not showing in grub2

2011-09-27 Thread Prashant Shah
Hi, On Wed, Sep 28, 2011 at 6:41 AM, scott wrote: > I compiled a 3.0.0-rc7 kernel. Everything went smoothly except it > doesn't show in the grub menu even after doing sudo update-grub. I see > the kernel in /boot/grub/grub.cfg. Everything appears right with the > UUID's and all. I noticed in /boo

Kernel not showing in grub2

2011-09-27 Thread scott
I compiled a 3.0.0-rc7 kernel. Everything went smoothly except it doesn't show in the grub menu even after doing sudo update-grub. I see the kernel in /boot/grub/grub.cfg. Everything appears right with the UUID's and all. I noticed in /boot it doesn't list the abi-3.0-rc7. System-map initrd-img

Re: Prevent a process from opening a file more than once

2011-09-27 Thread Venkatram Tummala
On Tue, Sep 27, 2011 at 5:40 PM, Jeff Haran wrote: > > > From: kernelnewbies-boun...@kernelnewbies.org > [mailto:kernelnewbies-boun...@kernelnewbies.org] On Behalf Of Venkatram > Tummala > Sent: Tuesday, September 27, 2011 5:31 PM > To: Mulyadi Santosa > Cc: kernelnewbies > Subject: Re: Prevent a

RE: Prevent a process from opening a file more than once

2011-09-27 Thread Jeff Haran
From: kernelnewbies-boun...@kernelnewbies.org [mailto:kernelnewbies-boun...@kernelnewbies.org] On Behalf Of Venkatram Tummala Sent: Tuesday, September 27, 2011 5:31 PM To: Mulyadi Santosa Cc: kernelnewbies Subject: Re: Prevent a process from opening a file more than once On Tue, Sep 27, 2011 at

Re: Prevent a process from opening a file more than once

2011-09-27 Thread Mulyadi Santosa
On Wed, Sep 28, 2011 at 07:30, Venkatram Tummala wrote: > On Tue, Sep 27, 2011 at 5:22 PM, Mulyadi Santosa > wrote: >> >> Hi :) >> >> On Wed, Sep 28, 2011 at 06:56, Venkatram Tummala >> wrote: >> > Hi All, >> > I have a simple device driver which creates a /dev/XYZ file. I need to >> > prevent a

Re: Prevent a process from opening a file more than once

2011-09-27 Thread Venkatram Tummala
On Tue, Sep 27, 2011 at 5:22 PM, Mulyadi Santosa wrote: > Hi :) > > On Wed, Sep 28, 2011 at 06:56, Venkatram Tummala > wrote: > > Hi All, > > I have a simple device driver which creates a /dev/XYZ file. I need to > > prevent a process from opening the file more than once. However, multiple > > pr

Re: Prevent a process from opening a file more than once

2011-09-27 Thread Mulyadi Santosa
Hi :) On Wed, Sep 28, 2011 at 06:56, Venkatram Tummala wrote: > Hi All, > I have a simple device driver which creates a /dev/XYZ file. I need to > prevent a process from opening the file more than once. However, multiple > processes can open the file simultaneously. Is there any any elegant way t

Prevent a process from opening a file more than once

2011-09-27 Thread Venkatram Tummala
Hi All, I have a simple device driver which creates a /dev/XYZ file. I need to prevent a process from opening the file more than once. However, multiple processes can open the file simultaneously. Is there any any elegant way to do this other than checking all opened files in the process ? ___

Re: Evicting Anonymous pages.

2011-09-27 Thread Prateek Sharma
On Tue, Sep 27, 2011 at 11:42 PM, Mulyadi Santosa wrote: > Hi :) > > On Wed, Sep 28, 2011 at 00:14, Prateek Sharma wrote: >> Hello everyone, >>  I am trying to understand the kernel page frame reclaiming >> mechanism, but one thing's bothering me: >> How does the kernel 'know' which anonymous pag

Re: Evicting Anonymous pages.

2011-09-27 Thread Mulyadi Santosa
Hi :) On Wed, Sep 28, 2011 at 00:14, Prateek Sharma wrote: > Hello everyone, >  I am trying to understand the kernel page frame reclaiming > mechanism, but one thing's bothering me: > How does the kernel 'know' which anonymous pages to evict? In the LRU > scheme,  'referenced/used' information fo

Evicting Anonymous pages.

2011-09-27 Thread Prateek Sharma
Hello everyone, I am trying to understand the kernel page frame reclaiming mechanism, but one thing's bothering me: How does the kernel 'know' which anonymous pages to evict? In the LRU scheme, 'referenced/used' information for each page is required (AFAIK). But anonymous pages can be used by us

Re: Why do processes with higher priority to be allocated more timeslice?

2011-09-27 Thread Mulyadi Santosa
Hi :) On Tue, Sep 27, 2011 at 20:06, Parmenides wrote: > Initially, I think that the scheduler should enlarge the timeslices of > CPU-bound processes to improve throughput. True :) >But, now I have realized > that the two goals of schedulers, namely shorter latency and higher > throughput,

Re: Why do processes with higher priority to be allocated more timeslice?

2011-09-27 Thread Parmenides
Hi, Mulyadi 2011/9/27 Mulyadi Santosa : > simply to say that, the more important a job is, it should be given > longer time to run... but, the process has privilege to yield before > time slice is up...and when it comes back,it will use the remaining > time slice.and its dynamic priority will