Re: How much control does a block driver have over the buffer cache?

2011-07-13 Thread Mulyadi Santosa
On Wed, Jul 13, 2011 at 07:30, Neil Baylis neil.bay...@gmail.com wrote:
 For example, would it be possible to create a block driver that does not use
 the buffer cache? I think the answer must be 'no' because the caching
 happens before the block driver gets any requests to move data.


something like dd iflag=direct or oflag=direct does?

btw, you are still under effect of hardware cache installed in the
hard disk itself...so what you see is actually IMHO a cumulative
effect of caching happen in the entire system

-- 
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


how to apply patches from git ?

2011-07-13 Thread RKK
 Hi all,

Sorry if this is a basic question.
How do i take patches from e-mail?
 for example git send mail sends patches as e-mail

if someone wants to apply that patch to his branch then how do i get
that in . patch format and then use
patch -p1 *.patch  or is there something im missing here? thanks.
-- 
Warm Regards,
Ravi .

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Need help understanding memory models, cpu modes and address translation

2011-07-13 Thread Vaibhav Jain
Hi,

I am eager to understand the basics of Memory models  (flat, segmented etc)
, CPU modes (real,protected)
and address translation (physical to logical etc.) and how all of them work
together. I am very confused
about this and would really appreciate if someone could provide good
references to these topics.

Thanks
Vaibhav Jain
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Need help: How to set .RECIPEPREFIX variable to whitespaces

2011-07-13 Thread amit mehta
Hi,

How to set .RECIPEPREFIX variable to whitespace(say 4 whitespces) , so that
make uses this particular set of characters to identify the recipe for
a particular target.
In my $HOME/.vimrc file, for code indentation purpose, I've put the
following entries
to replace tabs with 4 whitespaces:

snip from my $HOME/.vimrc file
replace tabs with spaces
set expandtab
set shiftwidth=4
set tabstop=4
snip from my $HOME/.vimrc file


but the above will cause problem in case you write your own makefile
for a kernel module,
because now the tab stroke will be replaced by 4 whitespaces which
'make' will not understand.
Quoting from 'make' manual,
Please note: you need to put a tab character at the beginning of
every recipe line!

Seems .RECIPEPREFIX will come for resuce, but as of now I don't know
how to use it
to fix my problem.

Regards,
Amit

-- 
Life is elsewhere. Cross Frontiers. Fly away.

- Salman Rushdie

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Need help understanding memory models, cpu modes and address translation

2011-07-13 Thread Vaibhav Jain
Hi,

Thanks for the link.I really appreciate but I need something more basic and
something that
explains these concepts from a broader perspective and not in the context of
a
particular cpu architecture.Please send me more such links if you come
across any.

Thanks
Vaibhav Jain

On Wed, Jul 13, 2011 at 1:14 AM, Daniel Baluta daniel.bal...@gmail.comwrote:

 Hi,

  I am eager to understand the basics of Memory models  (flat, segmented
 etc)
  , CPU modes (real,protected)
  and address translation (physical to logical etc.) and how all of them
 work
  together. I am very confused
  about this and would really appreciate if someone could provide good
  references to these topics.

 You may find useful information inside i366 Programmers Manual.
 Anyhow, reading materials is the first step in understanding these
 concepts. You will have to actually  read/write/debug pieces of code
 related to them.

 thanks,
 Daniel.

 [1] pdos.csail.mit.edu/6.828/2010/readings/i386.pdf

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


RE: flush_cache_all API

2011-07-13 Thread 雷刚
Hi :

The SCU can solve all the cache coherency problems?


From: kernelnewbies-boun...@kernelnewbies.org 
[mailto:kernelnewbies-boun...@kernelnewbies.org] On Behalf Of Vladimir Murzin
Sent: 2011年7月11日 17:51
To: naveen yadav
Cc: kernelnewbies@kernelnewbies.org
Subject: Re: flush_cache_all API


On 7/11/11, naveen yadav yad.nav...@gmail.com wrote:
 Hi All,

 I am using Multi-core ARM machine.
 If I use flush_cache_all() API, will it flush only current CPU cache
 ?, or flush all cache's of all core's.

 Thanks

 ___
 Kernelnewbies mailing list
 Kernelnewbies@kernelnewbies.org
 http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

Hi!

I think, it doesn't matter as soon as SCU is involved.

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Need help understanding memory models, cpu modes and address translation

2011-07-13 Thread amit mehta
Tons of resource
http://wiki.osdev.org/

On Wed, Jul 13, 2011 at 2:07 PM, Vaibhav Jain vjoss...@gmail.com wrote:
 Hi,

 Thanks for the link.I really appreciate but I need something more basic and
 something that
 explains these concepts from a broader perspective and not in the context of
 a
 particular cpu architecture.Please send me more such links if you come
 across any.

 Thanks
 Vaibhav Jain

 On Wed, Jul 13, 2011 at 1:14 AM, Daniel Baluta daniel.bal...@gmail.com
 wrote:

 Hi,

  I am eager to understand the basics of Memory models  (flat, segmented
  etc)
  , CPU modes (real,protected)
  and address translation (physical to logical etc.) and how all of them
  work
  together. I am very confused
  about this and would really appreciate if someone could provide good
  references to these topics.

 You may find useful information inside i366 Programmers Manual.
 Anyhow, reading materials is the first step in understanding these
 concepts. You will have to actually  read/write/debug pieces of code
 related to them.

 thanks,
 Daniel.

 [1] pdos.csail.mit.edu/6.828/2010/readings/i386.pdf


 ___
 Kernelnewbies mailing list
 Kernelnewbies@kernelnewbies.org
 http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies





-- 
Life is elsewhere. Cross Frontiers. Fly away.

- Salman Rushdie

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: how to apply patches from git ?

2011-07-13 Thread Jeff Kirsher
On Wed, Jul 13, 2011 at 00:22, RKK kulkarni.ra...@gmail.com wrote:
  Hi all,

 Sorry if this is a basic question.
 How do i take patches from e-mail?
  for example git send mail sends patches as e-mail

 if someone wants to apply that patch to his branch then how do i get
 that in . patch format and then use
 patch -p1 *.patch  or is there something im missing here? thanks.
 --
 Warm Regards,
 Ravi .


Save the email message in mbox format and then you can use git am
/path/to/mbox/file to apply the email patch to your tree.

-- 
Cheers,
Jeff

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Query about a PCI device error detection.

2011-07-13 Thread Nilesh
Resending the email to kernelnewbies list as well (have sent the same to 
edac mailing list). Appreciate any pointers on below query, if any one 
has worked on edac.

On Wednesday 06 July 2011 03:56 PM, nilesh wrote:
 Hi,

 I am fairly new to the edac driver and have some basic query regarding
 the error detection in case of PCI devices. I could see the module for
 memory controller's error detection is done s.t. UE/CE/controller
 specific errors are scanned and detected, also the PCI errors are also
 scanned.

 E.g. in case of i5400 :
 i5400_edac.c :
 i5400_probe1()
 {

 1285 /* Set the function pointer to an actual operation function
 */
 1286 mci-edac_check = i5400_check_error;
 ...
 1312 /* allocating generic PCI control info */
 1313 i5400_pci = edac_pci_create_generic_ctl(pdev-dev,
 EDAC_MOD_STR);
 }

 And we check the PCI status registers for the errors.
 edac_pci_generic_check() --  edac_pci_do_parity_check() --
 edac_pci_dev_parity_test()

 So, i5400_check_error - detect UE/CE.
 edac_pci_generic_check - detect PCI errors.

 Query:
 --
 * If one wants to get the errors harvested for non-MC device (e.g.
 ethernet controller etc.) is it going to be done through
 edac_pci_generic_check() automatically - as we already scan through all
 PCI devices in a loop? Is it required to add the separate module for
 that device?


-- 
Thanks,
Nilesh

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


xx_initcall ( ) in kernel

2011-07-13 Thread sumeet linux
Dear friends,

I want to know the basics xx_initcall ( ) in linux kernel. How this function
works ?
Observed in kernel code, many places late_initcall ( ), early_initcall ( ),
arch_initcall ( ), core_initcall ( ) gets called.
When did all these functions gets call during kernel initialization ?
I am more interested in what is the sequence of these functions gets called
one after another.

Thank you.

Regards,
Sumeet
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Need help understanding memory models, cpu modes and address translation

2011-07-13 Thread Paraneetharan Chandrasekaran
The document and osdev are very good and useful. Thanks a lot.

- Paraneetharan C

On 13 July 2011 14:23, amit mehta gmate.a...@gmail.com wrote:

 Tons of resource
 http://wiki.osdev.org/

 On Wed, Jul 13, 2011 at 2:07 PM, Vaibhav Jain vjoss...@gmail.com wrote:
  Hi,
 
  Thanks for the link.I really appreciate but I need something more basic
 and
  something that
  explains these concepts from a broader perspective and not in the context
 of
  a
  particular cpu architecture.Please send me more such links if you come
  across any.
 
  Thanks
  Vaibhav Jain
 
  On Wed, Jul 13, 2011 at 1:14 AM, Daniel Baluta daniel.bal...@gmail.com
  wrote:
 
  Hi,
 
   I am eager to understand the basics of Memory models  (flat, segmented
   etc)
   , CPU modes (real,protected)
   and address translation (physical to logical etc.) and how all of them
   work
   together. I am very confused
   about this and would really appreciate if someone could provide good
   references to these topics.
 
  You may find useful information inside i366 Programmers Manual.
  Anyhow, reading materials is the first step in understanding these
  concepts. You will have to actually  read/write/debug pieces of code
  related to them.
 
  thanks,
  Daniel.
 
  [1] pdos.csail.mit.edu/6.828/2010/readings/i386.pdf
 
 
  ___
  Kernelnewbies mailing list
  Kernelnewbies@kernelnewbies.org
  http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
 
 



 --
 Life is elsewhere. Cross Frontiers. Fly away.

 - Salman Rushdie

 ___
 Kernelnewbies mailing list
 Kernelnewbies@kernelnewbies.org
 http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies




-- 
Regards,
Paraneetharan C
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: xx_initcall ( ) in kernel

2011-07-13 Thread nilesh
Hi Sumeet,

On Wednesday 13 July 2011 04:12 PM, sumeet linux wrote:
 Dear friends,

 I want to know the basics xx_initcall ( ) in linux kernel. How this function
 works ?
 Observed in kernel code, many places late_initcall ( ), early_initcall ( ),
 arch_initcall ( ), core_initcall ( ) gets called.
 When did all these functions gets call during kernel initialization ?
 I am more interested in what is the sequence of these functions gets called
 one after another.
I could get a nice link explaining about *_initcall(). Refer:
http://book.opensourceproject.org.cn/embedded/embeddedprime/opensource/0136130550/ch05lev1sec4.html

*_initcall() are macros which set the function pointers for subsystem 
initialization (typedef int (*initcall_t)(void) : typedef of all such 
function pointers).
Also if we look at the source code, the functions are called in below 
sequence:
http://lxr.linux.no/#linux+v2.6.39/init/main.c#L695

do_basic_setup(void) - do_initcalls(void) - do_one_initcall(*fn);
do_one_initcall(*fn) - calls each function. And do_basic_setup() is 
called inside the initialization sequence (kernel_init()).


 Thank you.

 Regards,
 Sumeet


-- 
Thanks,
Nilesh

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Questions regarding console drivers..

2011-07-13 Thread sandeep kumar
Hi all,
I have gone through the kernel/kernel/printk.c file. And i have the
following questions..
I have some rough idea of several things, but i need to conform them

1) What is a console driver? -- My idea is it allows the kernel to input or
output the characters
  to or from a particular
device.
2) Why so many command-line consoles are needed? -- (if first qn is
right...why cant u use single
   console to several devices)
3) What is a boot console  real console?

4) How to know how many number of consoles are running at a time?

5) In the boot command line we will pass one console name console=ttyXXX,
other than that where the remaining consoles are being registered?

Please answer these questions so that i can have furthur understanding

Thank you all..
-- 
With regards,
Sandeep Kumar Anantapalli,
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Need basics of booting process

2011-07-13 Thread Tapas Mishra
On Wed, Jul 13, 2011 at 1:11 AM, Pavan Kandepet pava...@gmail.com wrote:

 Check this one out:
 http://milindchoudhary.wordpress.com/2009/03/30/linux-boot-process/

 Another one:

 http://duartes.org/gustavo/blog/post/kernel-boot-process

 Hope this helps,
 Pavan



 On Tue, Jul 12, 2011 at 11:07 AM, Mulyadi Santosa 
 mulyadi.sant...@gmail.com wrote:

 On Tue, Jul 12, 2011 at 21:04, Niamathullah sharief newbie...@gmail.com
 wrote:
  Its getting confusion for me..I am telling what i understood
 
  BIOS---POST-MBR---Bootloader--Kernel.

 Roughly, yeah something like thatmind you, POST is a procedure
 that is part of BIOS initialization

 --
 regards,

 Mulyadi Santosa
 Freelance Linux trainer and consultant

 blog: the-hydra.blogspot.com
 training: mulyaditraining.blogspot.com


Can any one share the process of Xen bootstrapping.It is hypervisor which
starts.Any link etc.
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: how to apply patches from git ?

2011-07-13 Thread Christopher Harvey
On Wed, 13 Jul 2011 02:16:09 -0700, Jeff Kirsher wrote:
 On Wed, Jul 13, 2011 at 00:22, RKK kulkarni.ra...@gmail.com wrote:
  Hi all,

 Sorry if this is a basic question.
 How do i take patches from e-mail?
  for example git send mail sends patches as e-mail

 if someone wants to apply that patch to his branch then how do i get
 that in . patch format and then use
 patch -p1 *.patch  or is there something im missing here? thanks.
 --
 Warm Regards,
 Ravi .


 Save the email message in mbox format and then you can use git am
 /path/to/mbox/file to apply the email patch to your tree.

well, actually you don't need to do the whole mbox thing with git. You 
only need to get the patches into .patch files in a directory. I believe 
you can then use git am /path/to/patches and it will apply the patches 
in the order the ls command displays them.

I'm assuming that would be helpful since most people who don't know how 
to apply patches from mail also don't have an mbox.


___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: how to apply patches from git ?

2011-07-13 Thread Anand Arumugam
Take a look at 'git apply' and 'git format-patch' commands.

On Wed, Jul 13, 2011 at 3:22 AM, RKK kulkarni.ra...@gmail.com wrote:
  Hi all,

 Sorry if this is a basic question.
 How do i take patches from e-mail?
  for example git send mail sends patches as e-mail

 if someone wants to apply that patch to his branch then how do i get
 that in . patch format and then use
 patch -p1 *.patch  or is there something im missing here? thanks.
 --
 Warm Regards,
 Ravi .

 ___
 Kernelnewbies mailing list
 Kernelnewbies@kernelnewbies.org
 http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: how to apply patches from git ?

2011-07-13 Thread esmaeil mirzaee
On Wed, Jul 13, 2011 at 9:40 AM, Anand Arumugam anand.aru...@gmail.comwrote:

 Take a look at 'git apply' and 'git format-patch' commands.

 On Wed, Jul 13, 2011 at 3:22 AM, RKK kulkarni.ra...@gmail.com wrote:
   Hi all,
 
  Sorry if this is a basic question.
  How do i take patches from e-mail?
   for example git send mail sends patches as e-mail
 
  if someone wants to apply that patch to his branch then how do i get
  that in . patch format and then use
  patch -p1 *.patch  or is there something im missing here? thanks.
  --
  Warm Regards,
  Ravi .
 
  ___
  Kernelnewbies mailing list
  Kernelnewbies@kernelnewbies.org
  http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
 

 ___
 Kernelnewbies mailing list
 Kernelnewbies@kernelnewbies.org
 http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Hi
you can see greg video about write and submit your first kernel patch it's
really good. It can help you very much.
the link is www.youtube.com/watch?v=LLBrBBImJt4

best
samuel
PS: apologize in advance to weak english and multi times send.
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Need help: How to set .RECIPEPREFIX variable to whitespaces

2011-07-13 Thread DG
On Wed, Jul 13, 2011 at 1:52 AM, amit mehta gmate.a...@gmail.com wrote:
 Hi,

 How to set .RECIPEPREFIX variable to whitespace(say 4 whitespces) , so that
 make uses this particular set of characters to identify the recipe for
 a particular target.
 In my $HOME/.vimrc file, for code indentation purpose, I've put the
 following entries
 to replace tabs with 4 whitespaces:

 snip from my $HOME/.vimrc file
 replace tabs with spaces
 set expandtab
 set shiftwidth=4
 set tabstop=4
 snip from my $HOME/.vimrc file


 but the above will cause problem in case you write your own makefile
 for a kernel module,
 because now the tab stroke will be replaced by 4 whitespaces which
 'make' will not understand.
 Quoting from 'make' manual,
 Please note: you need to put a tab character at the beginning of
 every recipe line!

 Seems .RECIPEPREFIX will come for resuce, but as of now I don't know
 how to use it
 to fix my problem.

 Regards,
 Amit

 --
 Life is elsewhere. Cross Frontiers. Fly away.

 - Salman Rushdie

 ___
 Kernelnewbies mailing list
 Kernelnewbies@kernelnewbies.org
 http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


I have my vimrc file setup to use different tabs/spacing depending on
the filetype.  8-width tab in C, 4-space indent in Python, etc...

Here's a snippet from my vimrc:

 C -
function! LANG_C()
setlocal noexpandtab
setlocal shiftwidth=8
setlocal tabstop=8
setlocal softtabstop=8
setlocal formatoptions=tcroq
endfunction
autocmd FileType c call LANG_C()

--- Python 
function! LANG_PYTHON()
setlocal shiftwidth=4
setlocal tabstop=4
setlocal softtabstop=4
setlocal expandtab
--- python indent keywords 
setlocal cinwords=if,elif,else,for,while,try,except,finally,def,class,with
endfunction
autocmd FileType python call LANG_PYTHON()

--- Makefile --
function! LANG_MAKEFILE()
setlocal noexpandtab  makefiles only work with tab-indents
setlocal shiftwidth=8
setlocal tabstop=8
setlocal softtabstop=8
endfunction
autocmd FileType make call LANG_MAKEFILE()


There may be other/better ways to do this, but it works well for me.

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Regarding the basic use of perf top command

2011-07-13 Thread ankur dwivedi
Hi,

My question is regarding the basic use of perf top command in linux.

The following is the snap shot of running a *perf top -e cache-misses*
command from console:

--
   PerfTop:  76* irqs/sec*  kernel:14.5%  exact:  0.0% [1000Hz
cache-misses],  (all, 12 CPUs)
--

 *samples*  *pcnt* functionDSO
 ___ _ ___


   48.00 36.9% get_page_from_freelist
[kernel.kallsyms]
   12.00  9.2% JS_CallTracer
/usr/lib/xulrunner-1.9.2/libmozjs.so
   12.00  9.2% JS_TraceChildren
/usr/lib/xulrunner-1.9.2/libmozjs.so
8.00  6.2% dso__find_symbol
/usr/bin/perf
7.00  5.4% native_flush_tlb_single
[kernel.kallsyms]
6.00  4.6% _int_malloc
/lib/libc-2.12.90.so



What i want to know is the significance of different parameters here which
are the following:
1. irqs/sec
2. samples
3. pcnt

It also shows a value of 1000Hz. what is the meaning of that.

I searched regarding these in the internet, but was unable to find a good
explanation

Thanks
Ankur
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Kernel development process questions

2011-07-13 Thread Joel A Fernandes
Hi,

I went over the development process Documentation/ in the kernel tree,
and had the following question:

With respect to Linux Kernel development process, what does the word
stage mean? It is the process of getting patches into Greg's staging
tree, or is it linux-next? Or depends on the context?

Also, is there a standard way to track the status and location of a
patch (i.e. some information about which maintainer's tree it is
currently applied to, and which tree it is sent for applying to by
which maintainer etc). I guess one way is to read the mailing lists,
but is there a general preferred technique to get this information?

Regards,
Joel

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Regarding the basic use of perf top command

2011-07-13 Thread Vipin

Hi,

I think this should suffice
https://perf.wiki.kernel.org/index.php/Tutorial#Live_analysis_with_perf_top

Rest of the information is archived here
http://lxr.linux.no/linux+v2.6.39/tools/perf/Documentation/

The value of 1000Hz means the frequency at which the system's timer is 
programmed to interrupt the kernel. It is a kernel configurable option.


Thanks
Vipin
On 07/13/2011 10:59 AM, ankur dwivedi wrote:

Hi,

My question is regarding the basic use of perf top command in linux.

The following is the snap shot of running a *perf top -e 
cache-misses* command from console:


--
   PerfTop:  76*irqs/sec*  kernel:14.5%  exact:  0.0% [1000Hz 
cache-misses],  (all, 12 CPUs)

--

*samples* *pcnt* functionDSO
 ___ _ ___ 



   48.00 36.9% get_page_from_freelist  [kernel.kallsyms]
   12.00  9.2% JS_CallTracer   
/usr/lib/xulrunner-1.9.2/libmozjs.so
   12.00  9.2% JS_TraceChildren
/usr/lib/xulrunner-1.9.2/libmozjs.so

8.00  6.2% dso__find_symbol/usr/bin/perf
7.00  5.4% native_flush_tlb_single [kernel.kallsyms]
6.00  4.6% _int_malloc 
/lib/libc-2.12.90.so http://libc-2.12.90.so



What i want to know is the significance of different parameters here 
which are the following:

1. irqs/sec
2. samples
3. pcnt

It also shows a value of 1000Hz. what is the meaning of that.

I searched regarding these in the internet, but was unable to find a 
good explanation


Thanks
Ankur



___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: File System concept

2011-07-13 Thread Greg Freemyer
On Tue, Jul 12, 2011 at 9:44 AM, Ajay kumar a2008...@gmail.com wrote:
 Where can I read about different file system features ??
 snapshots, journaling etc..

 Regards,
 Onkar

I find wikipedia surprisingly good as a starting point for questions like that.

eg. http://en.wikipedia.org/wiki/Snapshot_%28computer_storage%29

Then look at the reference links at the bottom.

Greg

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


query regarding inode pages

2011-07-13 Thread shubham sharma
I am trying to write a memory based file system. The file system is
intended to create files/directories and write their contents only on
pages. For this I have used the function grab_cache_page() function to
get a new locked page in case the page does not exists in the radix
tree of the inode.

As the filesystem is memory based and all the data exists only on the
memory, so I don't release the lock on the page as I fear that the
pdflush daemon can swap out the pages on which I have written data and
I may never see that data again. I unlock all the pages of all the
inodes of the file system in the kill_sb function once the file system
is being unmounted. But the problem I am facing is that if I open a
file in which I have already written something (and its pages are
locked), the open system call in turn calls the __lock_page() function
which waits for the pages belonging to the inode to get unlocked.
Hence the system call stalls indefinitely. I want to know if there is
a mechanism by which I can prevent the pdflush daemon from swapping
the pages that my filesystem refers to??

What limited knowledge I have on pdflush daemon, I guess that the
daemon searches for the dirty inodes in the list maintained per super
block. So if I remove all the inodes from this list (or not add any of
my inodes I create in the list), will I be able to prevent the daemon
from flushing data from my file system?

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: query regarding inode pages

2011-07-13 Thread Joel A Fernandes
[CC'ing list]

Hi Shubham,

I am not very familiar with the code for pdflush. But wasn't it
superseded by bdflush (or similar) in recent kernels?

On Wed, Jul 13, 2011 at 10:45 AM, shubham sharma shubham20...@gmail.com wrote:
 I am trying to write a memory based file system. The file system is
 intended to create files/directories and write their contents only on
 pages. For this I have used the function grab_cache_page() function to
 get a new locked page in case the page does not exists in the radix
 tree of the inode.

 As the filesystem is memory based and all the data exists only on the
 memory, so I don't release the lock on the page as I fear that the
 pdflush daemon can swap out the pages on which I have written data and
 I may never see that data again. I unlock all the pages of all the
 inodes of the file system in the kill_sb function once the file system
 is being unmounted. But the problem I am facing is that if I open a
 file in which I have already written something (and its pages are
 locked), the open system call in turn calls the __lock_page() function
 which waits for the pages belonging to the inode to get unlocked.
 Hence the system call stalls indefinitely. I want to know if there is
 a mechanism by which I can prevent the pdflush daemon from swapping
 the pages that my filesystem refers to??

I'm not sure if pdflush is what swaps pages? Isn't that the role of
kswapd? pdflush AFAIK just writes dirty pages back to the backing
device.

I think what you're referring to is a certain page replacement
behavior in low memory conditions that you want to protect your
filesystem against. I will be interested in responses from others
about this, and will dig into the code during off office hours.

Maybe tmpfs is a good reference for your work?

Thanks,
Joel

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: query regarding inode pages

2011-07-13 Thread shubham sharma
Hi Joel,

On Wed, Jul 13, 2011 at 9:28 PM, Joel A Fernandes agnel.j...@gmail.com wrote:
 [CC'ing list]

 Hi Shubham,

 I am not very familiar with the code for pdflush. But wasn't it
 superseded by bdflush (or similar) in recent kernels?

I don't know about the bdflush daemon, but I guess that pdflush daemon
has been superseded in recent kernel. I am working on 2.6.18 kernel.


 On Wed, Jul 13, 2011 at 10:45 AM, shubham sharma shubham20...@gmail.com 
 wrote:
 I am trying to write a memory based file system. The file system is
 intended to create files/directories and write their contents only on
 pages. For this I have used the function grab_cache_page() function to
 get a new locked page in case the page does not exists in the radix
 tree of the inode.

 As the filesystem is memory based and all the data exists only on the
 memory, so I don't release the lock on the page as I fear that the
 pdflush daemon can swap out the pages on which I have written data and
 I may never see that data again. I unlock all the pages of all the
 inodes of the file system in the kill_sb function once the file system
 is being unmounted. But the problem I am facing is that if I open a
 file in which I have already written something (and its pages are
 locked), the open system call in turn calls the __lock_page() function
 which waits for the pages belonging to the inode to get unlocked.
 Hence the system call stalls indefinitely. I want to know if there is
 a mechanism by which I can prevent the pdflush daemon from swapping
 the pages that my filesystem refers to??

 I'm not sure if pdflush is what swaps pages? Isn't that the role of
 kswapd? pdflush AFAIK just writes dirty pages back to the backing
 device.

 I think what you're referring to is a certain page replacement
 behavior in low memory conditions that you want to protect your
 filesystem against.

Yes you got it correct. I want to protect my filesystem against low
memory conditions.

I will be interested in responses from others
 about this, and will dig into the code during off office hours.

 Maybe tmpfs is a good reference for your work?

Thanks for the lead. I will dig in that now.

 Thanks,
 Joel

Thanks,
Shubham

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


RE: Need help understanding memory models, cpu modes and address translation

2011-07-13 Thread Jeff Haran
 

 

From: kernelnewbies-boun...@kernelnewbies.org
[mailto:kernelnewbies-boun...@kernelnewbies.org] On Behalf Of Vaibhav
Jain
Sent: Wednesday, July 13, 2011 1:38 AM
To: Daniel Baluta
Cc: kernelnewbies@kernelnewbies.org
Subject: Re: Need help understanding memory models,cpu modes and address
translation

 

Hi,

Thanks for the link.I really appreciate but I need something more basic
and something that 
explains these concepts from a broader perspective and not in the
context of a 
particular cpu architecture.Please send me more such links if you come
across any.

Thanks
Vaibhav Jain

On Wed, Jul 13, 2011 at 1:14 AM, Daniel Baluta daniel.bal...@gmail.com
wrote:

Hi,

 I am eager to understand the basics of Memory models  (flat, segmented
etc)
 , CPU modes (real,protected)
 and address translation (physical to logical etc.) and how all of them
work
 together. I am very confused
 about this and would really appreciate if someone could provide good
 references to these topics.

You may find useful information inside i366 Programmers Manual.
Anyhow, reading materials is the first step in understanding these
concepts. You will have to actually  read/write/debug pieces of code
related to them.

thanks,
Daniel.

[1] pdos.csail.mit.edu/6.828/2010/readings/i386.pdf

 

You might want to try Understanding the Linux Virtual Memory Manager
by Mel Gorman. It's freely available on the web.

 

It's Linux specific, but since Linux needs to run on a multitude of
different processors with different memory management hardware, the
approach it takes to doing so in inherently broad.

 

 


___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Need help understanding memory models, cpu modes and address translation

2011-07-13 Thread Anuz Pratap Singh Tomar
On Wed, Jul 13, 2011 at 6:29 PM, Jeff Haran jha...@bytemobile.com wrote:

 ** **

 ** **

 *From:* kernelnewbies-boun...@kernelnewbies.org [mailto:
 kernelnewbies-boun...@kernelnewbies.org] *On Behalf Of *Vaibhav Jain
 *Sent:* Wednesday, July 13, 2011 1:38 AM
 *To:* Daniel Baluta
 *Cc:* kernelnewbies@kernelnewbies.org
 *Subject:* Re: Need help understanding memory models,cpu modes and address
 translation

 ** **

 Hi,

 Thanks for the link.I really appreciate but I need something more basic and
 something that
 explains these concepts from a broader perspective and not in the context
 of a
 particular cpu architecture.Please send me more such links if you come
 across any.

 Thanks
 Vaibhav Jain

 On Wed, Jul 13, 2011 at 1:14 AM, Daniel Baluta daniel.bal...@gmail.com
 wrote:

 Hi,

  I am eager to understand the basics of Memory models  (flat, segmented
 etc)
  , CPU modes (real,protected)
  and address translation (physical to logical etc.) and how all of them
 work
  together. I am very confused
  about this and would really appreciate if someone could provide good
  references to these topics.

 You may find useful information inside i366 Programmers Manual.
 Anyhow, reading materials is the first step in understanding these
 concepts. You will have to actually  read/write/debug pieces of code
 related to them.

 thanks,
 Daniel.

 [1] pdos.csail.mit.edu/6.828/2010/readings/i386.pdf

 ** **

 You might want to try “Understanding the Linux Virtual Memory Manager” by
 Mel Gorman. It’s freely available on the web.

 ** **

 It’s Linux specific, but since Linux needs to run on a multitude of
 different processors with different memory management hardware, the approach
 it takes to doing so in inherently broad.

 ** **




 A lot of basic concepts can be learnt from JIm Turley's book on 8086
Other book is modern operating systems by Tanenbaum which explains
everything in much detail with  code snippets.
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Device mapper header file error

2011-07-13 Thread Adil Mujeeb
Hi List,

** **

I am trying to compile a kernel module which uses the device mapper header
files (dm.h and dm-bio-list.h). I checked in the stock kernel source that
these files are present under drivers/md directory.

When I try to build the module, it gives error for these header files as
missing. I checked the Makefile and found that it includes the path
(-I$(TOPDIR)/ drivers/md)

** **

But when I check the content of this directory on my machine it doesn’t
include the header files:

[root@localhost redhat]# ls /usr/src/kernels/2.6.18-8.el5-i686/drivers/md***
*

Kconfig  Makefile  raid6test

[root@localhost redhat]#

** **

While the other header files referred by the kernel module under
include/linux directory exists.

** **

My machine detail:

[adil@localhost ~]$ uname -a

Linux localhost.localdomain 2.6.18-8.el5 #1 SMP Fri Jan 26 14:15:21 EST 2007
i686 i686 i386 GNU/Linux

[adil@localhost ~]$

** **

Thanks in advance.

**

Regards,

Adil Mujeeb
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Need help understanding memory models, cpu modes and address translation

2011-07-13 Thread Vaibhav Jain
Hi,

Thanks a lot for the resources! I just had a cursory look at them and could
see that they explain virtual memory and
address translation in depth. Just wanted to ask if they explain the
concepts Memory models (flat, segmented ) and cpu modes
(real,protected) equally well. I am more confused about
these concepts.

Thanks
Vaibhav Jain

On Wed, Jul 13, 2011 at 10:40 AM, Anuz Pratap Singh Tomar 
chambilketha...@gmail.com wrote:



   On Wed, Jul 13, 2011 at 6:29 PM, Jeff Haran jha...@bytemobile.comwrote:

  ** **

 ** **

 *From:* kernelnewbies-boun...@kernelnewbies.org [mailto:
 kernelnewbies-boun...@kernelnewbies.org] *On Behalf Of *Vaibhav Jain
 *Sent:* Wednesday, July 13, 2011 1:38 AM
 *To:* Daniel Baluta
 *Cc:* kernelnewbies@kernelnewbies.org
 *Subject:* Re: Need help understanding memory models,cpu modes and
 address translation

 ** **

 Hi,

 Thanks for the link.I really appreciate but I need something more basic
 and something that
 explains these concepts from a broader perspective and not in the context
 of a
 particular cpu architecture.Please send me more such links if you come
 across any.

 Thanks
 Vaibhav Jain

 On Wed, Jul 13, 2011 at 1:14 AM, Daniel Baluta daniel.bal...@gmail.com
 wrote:

 Hi,

  I am eager to understand the basics of Memory models  (flat, segmented
 etc)
  , CPU modes (real,protected)
  and address translation (physical to logical etc.) and how all of them
 work
  together. I am very confused
  about this and would really appreciate if someone could provide good
  references to these topics.

 You may find useful information inside i366 Programmers Manual.
 Anyhow, reading materials is the first step in understanding these
 concepts. You will have to actually  read/write/debug pieces of code
 related to them.

 thanks,
 Daniel.

 [1] pdos.csail.mit.edu/6.828/2010/readings/i386.pdf

 ** **

 You might want to try “Understanding the Linux Virtual Memory Manager” by
 Mel Gorman. It’s freely available on the web.

 ** **

 It’s Linux specific, but since Linux needs to run on a multitude of
 different processors with different memory management hardware, the approach
 it takes to doing so in inherently broad.

 ** **




 A lot of basic concepts can be learnt from JIm Turley's book on 8086
 Other book is modern operating systems by Tanenbaum which explains
 everything in much detail with  code snippets.



___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: how to apply patches from git ?

2011-07-13 Thread RKK
Hi


  Hi all,

 Sorry if this is a basic question.
 How do i take patches from e-mail?
  for example git send mail sends patches as e-mail

 if someone wants to apply that patch to his branch then how do i get
 that in . patch format and then use
 patch -p1 *.patch  or is there something im missing here? thanks.
 --
 Warm Regards,
 Ravi .


 Save the email message in mbox format and then you can use git am
 /path/to/mbox/file to apply the email patch to your tree.

 well, actually you don't need to do the whole mbox thing with git. You
 only need to get the patches into .patch files in a directory. I believe
 you can then use git am /path/to/patches and it will apply the patches
 in the order the ls command displays them.
 are there any git tools to set up this so that i can use them ?

 I'm assuming that would be helpful since most people who don't know how
 to apply patches from mail also don't have an mbox.


makes sense


-- 
Warm Regards,
Ravi Kulkarni.

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies