Re: allocating huge amount of memory

2009-08-17 Thread Devesh Sharma
On Tue, Aug 18, 2009 at 10:45 AM, Michael
Blizek wrote:
> Hi!
>
> On 10:08 Tue 18 Aug     , Devesh Sharma wrote:
>> On Tue, Aug 18, 2009 at 9:17 AM, Mulyadi
>> Santosa wrote:
>> > On Tue, Aug 18, 2009 at 4:03 AM,  wrote:
>> >> Hi,
>> >>
>> >>  I trying to allocate huge amount of memory >4GB (64bit) in LKM:
>> >>
>> If you do not require contiguous memory, use multiple calls of
>> get_free_pages with order 10
>> and have some simple buffer managament scheme over it.
>
> I would rather recommend calling it with order 0. This means allocating
> single pages instead of several contiguous ones. By doing this, you will
> suffer less when the memory gets fragmented and you decrease the pressure
> on the memory subsystem.
Hmmsurly this will avoid fragmentation but, on the contrary, it
will increase the size of
array holding the buffer pointers. Well, the trade-off always remains
there, order must be allocated wisely.
>
>        -Michi
> --
> programing a layer 3+4 network protocol for mesh networks
> see http://michaelblizek.twilightparadox.com
>
>

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecar...@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ



Re: allocating huge amount of memory

2009-08-17 Thread shailesh jain
http://www.mjmwired.net/kernel/Documentation/vm/hugetlbpage.txt

This should help.


On Mon, Aug 17, 2009 at 9:38 PM, Devesh Sharma  wrote:

> On Tue, Aug 18, 2009 at 9:17 AM, Mulyadi
> Santosa wrote:
> > On Tue, Aug 18, 2009 at 4:03 AM,  wrote:
> >> Hi,
> >>
> >>  I trying to allocate huge amount of memory >4GB (64bit) in LKM:
> >>
> If you do not require contiguous memory, use multiple calls of
> get_free_pages with order 10
> and have some simple buffer managament scheme over it.
> >>  kmalloc - has limit.
> >>  multiple kmalloc (about 2000) - kernel panic.
> >>  vmalloc - has limit (aswell as multiple vmalloc).
> >>  appending kernel parameter vmalloc=2048M - kernel panic on boot.
> >>
> >>  So, is there the way to allocate huge amount of memory?
> >>  Haven't tried alloc_bootmem yet - is it the answer?
> >>
> >>  kernel 2.6.24.5
> >
> > How about HugeTLB? the one that will use 2MB or 4MB page size but
> > I never read exactly which APIs you have to use.
> >
> > I also don't know whether the reserved virtual address space range is
> > sufficient for your need, but since we're talking about 64 bit kernel
> > here, I guess you have plenty of room.
> >
> > --
> > regards,
> >
> > Mulyadi Santosa
> > Freelance Linux trainer
> > blog: the-hydra.blogspot.com
> >
> > --
> > To unsubscribe from this list: send an email with
> > "unsubscribe kernelnewbies" to ecar...@nl.linux.org
> > Please read the FAQ at http://kernelnewbies.org/FAQ
> >
> >
>
> --
> To unsubscribe from this list: send an email with
> "unsubscribe kernelnewbies" to ecar...@nl.linux.org
> Please read the FAQ at http://kernelnewbies.org/FAQ
>
>


Re: allocating huge amount of memory

2009-08-17 Thread Michael Blizek
Hi!

On 10:08 Tue 18 Aug , Devesh Sharma wrote:
> On Tue, Aug 18, 2009 at 9:17 AM, Mulyadi
> Santosa wrote:
> > On Tue, Aug 18, 2009 at 4:03 AM,  wrote:
> >> Hi,
> >>
> >>  I trying to allocate huge amount of memory >4GB (64bit) in LKM:
> >>
> If you do not require contiguous memory, use multiple calls of
> get_free_pages with order 10
> and have some simple buffer managament scheme over it.

I would rather recommend calling it with order 0. This means allocating
single pages instead of several contiguous ones. By doing this, you will
suffer less when the memory gets fragmented and you decrease the pressure
on the memory subsystem.

-Michi
-- 
programing a layer 3+4 network protocol for mesh networks
see http://michaelblizek.twilightparadox.com


--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecar...@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ



error in sysfs node create

2009-08-17 Thread Shankar Ganesh
Hi Friends ,

When the driver try to  create node under sysfs during boot-up , i am
getting following error.
sysfs: duplicate filename '254:0' can not be created . Can you help me out
to resolve this error ?

Trace attached below .

Thanks,
Shankar


[ cut here ]
WARNING: at fs/sysfs/dir.c:463 sysfs_add_one+0x34/0x44()
*sysfs: duplicate filename '254:0' can not be created*
Modules linked in:
[] (dump_stack+0x0/0x14) from []
(warn_slowpath+0x60/0x7c)
[] (warn_slowpath+0x0/0x7c) from []
(sysfs_add_one+0x34/0x44)
 r3:ce41ee20 r2:c03b643a
 r6:cf81fd38 r5:ce4211e8 r4:ffef
[] (sysfs_add_one+0x0/0x44) from []
(sysfs_do_create_link+0xb4/0x148)
 r5:ce4211e8 r4:ce421278
[] (sysfs_do_create_link+0x0/0x148) from []
(sysfs_create_link+0x14/0x18)
 r8:ce41f48c r7: r6:cf80aa20 r5:ce41f400 r4:cf81fd89
[] (sysfs_create_link+0x0/0x18) from []
(device_add+0x130/0x53c)
[] (device_add+0x0/0x53c) from []
(device_register+0x1c/0x20)
[] (device_register+0x0/0x20) from []
(rtc_device_register+0x110/0x1c8)
 r5: r4:ce41f400
[] (rtc_device_register+0x0/0x1c8) from []
(twl4030_rtc_probe+0x3c/0x1cc)
[] (twl4030_rtc_probe+0x0/0x1cc) from []
(platform_drv_probe+0x20/0x24)
 r8:c0423b68 r7:cf3ca560 r6:c042d840 r5:cf8eda08 r4:cf8eda08
[] (platform_drv_probe+0x0/0x24) from []
(driver_probe_device+0xd0/0x17c)
[] (driver_probe_device+0x0/0x17c) from []
(__driver_attach+0x4c/0x70)
 r7:cf3ca560 r6:c042d840 r5:cf8edab4 r4:cf8eda08
[] (__driver_attach+0x0/0x70) from []
(bus_for_each_dev+0x4c/0x80)
 r7:cf3ca560 r6:c042d840 r5:c01c7784 r4:
[] (bus_for_each_dev+0x0/0x80) from []
(driver_attach+0x20/0x28)
 r6:c042d840 r5: r4:
[] (driver_attach+0x0/0x28) from []
(bus_add_driver+0xa8/0x210)
[] (bus_add_driver+0x0/0x210) from []
(driver_register+0x98/0x120)
 r8: r7:c00234b4 r6:c042d840 r5: r4:c002ab84
[] (driver_register+0x0/0x120) from []
(platform_driver_register+0x78/0x94)
 r9: r8: r7:c00234b4 r6: r5:
r4:c002ab84
[] (platform_driver_register+0x0/0x94) from []
(twl4030_rtc_init+0x14/0x1c)
[] (twl4030_rtc_init+0x0/0x1c) from []
(do_one_initcall+0x54/0x184)
[] (do_one_initcall+0x0/0x184) from []
(kernel_init+0x80/0xf4)
 r8: r7: r6: r5: r4:c002ab84
[] (kernel_init+0x0/0xf4) from [] (do_exit+0x0/0x744)
 r4:
---[ end trace 70f73452e09e3610 ]---









"The most beautiful thing we can experience is the mysterious. It is the
source of all true art and science."



-- 
With Regards,
ShankarGanesh K .







"The most beautiful thing we can experience is the mysterious. It is the
source of all true art and science."


Re: allocating huge amount of memory

2009-08-17 Thread Devesh Sharma
On Tue, Aug 18, 2009 at 9:17 AM, Mulyadi
Santosa wrote:
> On Tue, Aug 18, 2009 at 4:03 AM,  wrote:
>> Hi,
>>
>>  I trying to allocate huge amount of memory >4GB (64bit) in LKM:
>>
If you do not require contiguous memory, use multiple calls of
get_free_pages with order 10
and have some simple buffer managament scheme over it.
>>  kmalloc - has limit.
>>  multiple kmalloc (about 2000) - kernel panic.
>>  vmalloc - has limit (aswell as multiple vmalloc).
>>  appending kernel parameter vmalloc=2048M - kernel panic on boot.
>>
>>  So, is there the way to allocate huge amount of memory?
>>  Haven't tried alloc_bootmem yet - is it the answer?
>>
>>  kernel 2.6.24.5
>
> How about HugeTLB? the one that will use 2MB or 4MB page size but
> I never read exactly which APIs you have to use.
>
> I also don't know whether the reserved virtual address space range is
> sufficient for your need, but since we're talking about 64 bit kernel
> here, I guess you have plenty of room.
>
> --
> regards,
>
> Mulyadi Santosa
> Freelance Linux trainer
> blog: the-hydra.blogspot.com
>
> --
> To unsubscribe from this list: send an email with
> "unsubscribe kernelnewbies" to ecar...@nl.linux.org
> Please read the FAQ at http://kernelnewbies.org/FAQ
>
>

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecar...@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ



Re: allocating huge amount of memory

2009-08-17 Thread Mulyadi Santosa
On Tue, Aug 18, 2009 at 4:03 AM,  wrote:
> Hi,
>
>  I trying to allocate huge amount of memory >4GB (64bit) in LKM:
>
>  kmalloc - has limit.
>  multiple kmalloc (about 2000) - kernel panic.
>  vmalloc - has limit (aswell as multiple vmalloc).
>  appending kernel parameter vmalloc=2048M - kernel panic on boot.
>
>  So, is there the way to allocate huge amount of memory?
>  Haven't tried alloc_bootmem yet - is it the answer?
>
>  kernel 2.6.24.5

How about HugeTLB? the one that will use 2MB or 4MB page size but
I never read exactly which APIs you have to use.

I also don't know whether the reserved virtual address space range is
sufficient for your need, but since we're talking about 64 bit kernel
here, I guess you have plenty of room.

-- 
regards,

Mulyadi Santosa
Freelance Linux trainer
blog: the-hydra.blogspot.com

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecar...@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ



allocating huge amount of memory

2009-08-17 Thread vadimbox
Hi,

  I trying to allocate huge amount of memory >4GB (64bit) in LKM:

  kmalloc - has limit.
  multiple kmalloc (about 2000) - kernel panic.
  vmalloc - has limit (aswell as multiple vmalloc).
  appending kernel parameter vmalloc=2048M - kernel panic on boot.

  So, is there the way to allocate huge amount of memory?
  Haven't tried alloc_bootmem yet - is it the answer?

  kernel 2.6.24.5

Thanks,
Vadim.


--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecar...@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ



Re: 32-bit kernel

2009-08-17 Thread Greg Freemyer
On Mon, Aug 17, 2009 at 2:12 PM, Manish
Rangankar wrote:
> Hi Peter,
>
> Sorry to bother you again, I was looking at the filesystem code for ufs.h
> and I found that there are some metadata which is highly dependent on
> whether the OS support 32bit or 64bit.
>
> Snippet of ufs super block.
>
>  __fs64    fs_size;  /* number of blocks in fs */
>     __fs64    fs_dsize; /* number of data blocks in
> fs */
>     __fs64   fs_csaddr; /* blk addr of cyl grp
> summary area */
>     __fs64    fs_pendingblocks;/* blocks in process of
> being freed */
>
> Number of data blocks supported on 64-bit(UFS) filesytem will be more then
> that of the 32-bit (UFS) filesystem. So if we want 32-bit UFS filesystem(on
> 32 bit OS) to support data block as many as 64-bit UFS file sytem then we
> have to modify UFS 32 bit filesystem.
>
> So my question is, whether the 64-bit filesystem is supported on 32-bit OS?
> I think it can be supported but with some changes in metadata structure
> which will definitely add some performance hit...
>
> Please confirm if this understanding is correct or not!!
>
> -Manish R

I believe ext4 is currently in the process of getting 64-bit support
in.  The plan is to make 32-bit function also, but as you say at a
slower speed.

At least with ext4, 32-bit supports up to 16TB I believe, so it is not
a huge issue.  I don't know if for instance, a 10 TB filesystem can be
created with 64-bit structure.  And if it is done, I don't know if a
kernel compiled for 32-bit would see a performance impact or not.

Greg

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecar...@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ



Re: 32-bit kernel

2009-08-17 Thread Manish Rangankar
Hi Peter,

Sorry to bother you again, I was looking at the filesystem code for ufs.h
and I found that there are some metadata which is highly dependent on
whether the OS support 32bit or 64bit.

Snippet of ufs super block.

 __fs64fs_size;  /* number of blocks in fs */
__fs64fs_dsize; /* number of data blocks in
fs */
__fs64   fs_csaddr; /* blk addr of cyl grp
summary area */
__fs64fs_pendingblocks;/* blocks in process of
being freed */

Number of data blocks supported on 64-bit(UFS) filesytem will be more then
that of the 32-bit (UFS) filesystem. So if we want 32-bit UFS filesystem(on
32 bit OS) to support data block as many as 64-bit UFS file sytem then we
have to modify UFS 32 bit filesystem.

So my question is, whether the 64-bit filesystem is supported on 32-bit OS?
I think it can be supported but with some changes in metadata structure
which will definitely add some performance hit...

Please confirm if this understanding is correct or not!!

-Manish R

On Sun, Aug 16, 2009 at 8:17 PM, manish  wrote:

> Thanks Peter... I had this question because one of the project I am working
> on had a two different flavour of UFS.. one is UFS and other one is UFS64
> bit, ported on proprietary OS.
> -Manish
>
>
> On Sun, Aug 16, 2009 at 5:26 PM, Peter Teoh wrote:
>
>> thanks for the confirmation.the only thing that matters is
>> performance.   as the data structure for the VFS layer is independent
>> (generally, i think) of 64 or 32bit kernel, so it should be indep of
>> 64/32bit kernel, but because 64bit have a larger data I/O rate, so
>> performance should be higherat the expense of more memory
>> consumed..
>>
>> On Sun, Aug 16, 2009 at 6:09 PM, SandeepKsinha
>> wrote:
>> > Hi Manish,
>> >
>> > On Sat, Aug 15, 2009 at 9:20 PM, Peter Teoh 
>> wrote:
>> >>
>> >> i don't think there is such a thing as 32/64 bit filesystem.
>> >> Filesystem type does not need to be linked to the OS's 32/64 bit
>> >> architecture.  Ie, ext2 or ext3, is the same when mounted in either
>> >> filesystem.   but the content within filesystem does matter, eg, if it
>> >> is 32/64bit executable etc.
>> >
>> > This is true 
>> >
>> >
>> > Regards,
>> > Sandeep.
>> >
>> >
>> >
>> >
>> >
>> >
>> > “To learn is to change. Education is a process that changes the
>> learner.”
>> >
>> >
>> >
>> >
>> >>
>> >> On Sat, Aug 15, 2009 at 1:37 AM, manish
>> wrote:
>> >> > Hi All,
>> >> >
>> >> > I have basic query!!
>> >> >
>> >> > I can have 32 and 64 bit filesystem on 64-bit kernel.  Is it possible
>> to
>> >> > have 64-bit filesystem on 32 bit kernel? Does linux support it?
>> >> >
>> >> > -Manish R
>> >>
>> >>
>> >>
>> >> --
>> >> Regards,
>> >> Peter Teoh
>> >>
>> >> --
>> >> To unsubscribe from this list: send an email with
>> >> "unsubscribe kernelnewbies" to ecar...@nl.linux.org
>> >> Please read the FAQ at http://kernelnewbies.org/FAQ
>> >>
>> >
>> >
>>
>>
>>
>> --
>> Regards,
>> Peter Teoh
>>
>
>


Re: Cache Size

2009-08-17 Thread Manish Rangankar
Thanks for quick reply, I think I have not conveyed the information
properly...The cache which I am talking about is buffer cache. I am not able
to relate the it with the cache in the document.

-Manish R

On Mon, Aug 17, 2009 at 5:19 PM, Raz  wrote:

> better if you simply read "what programmer should know about memory" by
> Urlich drepper.
>
>
> On Mon, Aug 17, 2009 at 11:39 AM, manish rangankar <
> rangankarman...@gmail.com> wrote:
>
>>  Hi All,
>>
>> How can we determine the size of cache?
>>
>> For example, In UFS filesystem some cache is reserved for CG. I read
>> somewhere on the net that 10% of the total RAM is sufficient for handling
>> the heavy incoming data IO request!
>>
>> I want to know like what all parameters are should be considered while
>> deciding a cache size, considering the worst case scenario i.e. heavy IO ?
>>
>> - Manish R
>>
>
>


Re: ext3 structure mapping to block device

2009-08-17 Thread Greg Freemyer
On Mon, Aug 17, 2009 at 2:08 AM, Manish Katiyar wrote:
> On Mon, Aug 17, 2009 at 11:06 AM, ajit mote wrote:
>>
>> Hello,
>>
>> I would like to know how file system structures are mapped to hard disk
>> sector.
>
> Each filesystem deals in the granularity of "block size" which is
> generally configurable (typically 4K) during fs creation time. So each
> block maps to 8 sectors (which are generally 512 bytes). Now given a
> block number you can multiply it by 8 to get your hard disk sector.

One slight clarification.  The above provides the sector relative to
the start of the partition (/dev/sda3 as an example).  Lower level
code maps that to the actual LBA that is sent to the hardware.

And in a classroom scenario you should at least mention that 512 byte
physical sectors are no longer the only option at the actual platter
level.  Instead 2K and 4K sectors are being seen in use.  The Linux
kernel just got (2.6.31 I think) the topo feature patchset to allow
the block stack as well as userspace the ability to see how these
underlying physical sectors are aligned.

So for these new drives, they still present a 512 byte logical sector
interface on the ATA interface, but for writes that don't completely
overwrite the true physical sector the following inefficient process
is followed in the drive itself:

Read physical sector (including header/footer/crc/etc), modify data,
update crc, write physical sector.

Obviously you have to allow the harddrive to do a full rotation
between the read and write, so the above is very inefficient.  Thus
the reason for the linux kernel growing topo support is that
filesystems and other users need to make a strong effort to align
their pages with these new drives physical sector layout.

I'm sure you can find a lwn article on the topo patchset that will
clarify this more than the above.

Greg

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecar...@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ



Re: Cache Size

2009-08-17 Thread Raz
better if you simply read "what programmer should know about memory" by
Urlich drepper.

On Mon, Aug 17, 2009 at 11:39 AM, manish rangankar <
rangankarman...@gmail.com> wrote:

> Hi All,
>
> How can we determine the size of cache?
>
> For example, In UFS filesystem some cache is reserved for CG. I read
> somewhere on the net that 10% of the total RAM is sufficient for handling
> the heavy incoming data IO request!
>
> I want to know like what all parameters are should be considered while
> deciding a cache size, considering the worst case scenario i.e. heavy IO ?
>
> - Manish R
>


Re: zero copy on socket recv

2009-08-17 Thread Rahul K Patel


Raz wrote:
I have implemented receive zero copy. but i did in UDP and not TCP. 
what protocol do u use ?
I am using UDP only. Can you please share the code or explain me how to 
implement it?


--Rahul


On Mon, Aug 17, 2009 at 11:55 AM, Rahul K Patel 
mailto:rahulk.pa...@einfochips.com>> wrote:


Hi,

I know about sendfile api which can be used to implement zero copy
for sending data over socket. But I want to implement zero copy on
socket receiving side. I looked at the kernel code and found that
mmap is also not available on socket.
Is it possible to implement zerocopy on socket receive without
modifying kernel code?
or is there any api/syscall available for it?

thanks for any help,

-- 
Rahul Patel

Embedded Software Engineer
eInfochips Ltd.
Tel. No. 91-79-26400801-2 Ext. 156
www.einfochips.com 

-- 
_

Disclaimer: This e-mail message and all attachments transmitted
with it
are intended solely for the use of the addressee and may contain
legally
privileged and confidential information. If the reader of this message
is not the intended recipient, or an employee or agent responsible for
delivering this message to the intended recipient, you are hereby
notified that any dissemination, distribution, copying, or other
use of
this message or its attachments is strictly prohibited. If you have
received this message in error, please notify the sender
immediately by
replying to this message and please delete it from your computer. Any
views expressed in this message are those of the individual sender
unless otherwise stated.Company has taken enough precautions to
prevent
the spread of viruses. However the company accepts no liability
for any
damage caused by any virus transmitted by this email.
_


--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecar...@nl.linux.org

Please read the FAQ at http://kernelnewbies.org/FAQ




*Email Scanned for Virus & Dangerous Content by :* 
*www.CleanMailGateway.com*




--
_
Disclaimer: This e-mail message and all attachments transmitted with it
are intended solely for the use of the addressee and may contain legally
privileged and confidential information. If the reader of this message
is not the intended recipient, or an employee or agent responsible for
delivering this message to the intended recipient, you are hereby
notified that any dissemination, distribution, copying, or other use of
this message or its attachments is strictly prohibited. If you have
received this message in error, please notify the sender immediately by
replying to this message and please delete it from your computer. Any
views expressed in this message are those of the individual sender
unless otherwise stated.Company has taken enough precautions to prevent
the spread of viruses. However the company accepts no liability for any
damage caused by any virus transmitted by this email.
_



Re: zero copy on socket recv

2009-08-17 Thread Raz
I have implemented receive zero copy. but i did in UDP and not TCP. what
protocol do u use ?

On Mon, Aug 17, 2009 at 11:55 AM, Rahul K Patel  wrote:

> Hi,
>
> I know about sendfile api which can be used to implement zero copy for
> sending data over socket. But I want to implement zero copy on socket
> receiving side. I looked at the kernel code and found that mmap is also not
> available on socket.
> Is it possible to implement zerocopy on socket receive without modifying
> kernel code?
> or is there any api/syscall available for it?
>
> thanks for any help,
>
> --
> Rahul Patel
> Embedded Software Engineer
> eInfochips Ltd.
> Tel. No. 91-79-26400801-2 Ext. 156
> www.einfochips.com
>
> --
> _
> Disclaimer: This e-mail message and all attachments transmitted with it
> are intended solely for the use of the addressee and may contain legally
> privileged and confidential information. If the reader of this message
> is not the intended recipient, or an employee or agent responsible for
> delivering this message to the intended recipient, you are hereby
> notified that any dissemination, distribution, copying, or other use of
> this message or its attachments is strictly prohibited. If you have
> received this message in error, please notify the sender immediately by
> replying to this message and please delete it from your computer. Any
> views expressed in this message are those of the individual sender
> unless otherwise stated.Company has taken enough precautions to prevent
> the spread of viruses. However the company accepts no liability for any
> damage caused by any virus transmitted by this email.
> _
>
>
> --
> To unsubscribe from this list: send an email with
> "unsubscribe kernelnewbies" to ecar...@nl.linux.org
> Please read the FAQ at http://kernelnewbies.org/FAQ
>
>


Re: creating global variables in kernel

2009-08-17 Thread Robert P. J. Day
On Mon, 17 Aug 2009, SandeepKsinha wrote:

>
>
> On Mon, Aug 17, 2009 at 3:37 PM, krushnaal pai  wrote:
>   i want to create global variables /pointers in kernel which should
>   be accessible to all kernel modules ( i.e  all kernel modules
>   should be sharing the same copy )
>
>   how to?
>
>
> EXPORT_SYMBOL(variable);
>
> This should allow all the kernel modules to access the same.

  i discuss that very topic here:

http://linux.com/learn/linux-training/31161-the-kernel-newbie-corner-kernel-symbols-whats-available-to-your-module-what-isnt

rday
--

Robert P. J. Day   Waterloo, Ontario, CANADA

Linux Consulting, Training and Annoying Kernel Pedantry.

Web page:  http://crashcourse.ca
Twitter:   http://twitter.com/rpjday


Re: creating global variables in kernel

2009-08-17 Thread SandeepKsinha
On Mon, Aug 17, 2009 at 3:37 PM, krushnaal pai wrote:

> i want to create global variables /pointers in kernel which should be
> accessible to all kernel modules ( i.e  all kernel modules should be sharing
> the same copy )
>
> how to?
>

EXPORT_SYMBOL(variable);

This should allow all the kernel modules to access the same.



-- 
Regards,
Sandeep.






“To learn is to change. Education is a process that changes the learner.”


creating global variables in kernel

2009-08-17 Thread krushnaal pai
i want to create global variables /pointers in kernel which should be
accessible to all kernel modules ( i.e  all kernel modules should be sharing
the same copy )

how to?


zero copy on socket recv

2009-08-17 Thread Rahul K Patel

Hi,

I know about sendfile api which can be used to implement zero copy for 
sending data over socket. But I want to implement zero copy on socket 
receiving side. I looked at the kernel code and found that mmap is also 
not available on socket.
Is it possible to implement zerocopy on socket receive without modifying 
kernel code?

or is there any api/syscall available for it?

thanks for any help,

--
Rahul Patel
Embedded Software Engineer
eInfochips Ltd.
Tel. No. 91-79-26400801-2 Ext. 156
www.einfochips.com

--
_
Disclaimer: This e-mail message and all attachments transmitted with it
are intended solely for the use of the addressee and may contain legally
privileged and confidential information. If the reader of this message
is not the intended recipient, or an employee or agent responsible for
delivering this message to the intended recipient, you are hereby
notified that any dissemination, distribution, copying, or other use of
this message or its attachments is strictly prohibited. If you have
received this message in error, please notify the sender immediately by
replying to this message and please delete it from your computer. Any
views expressed in this message are those of the individual sender
unless otherwise stated.Company has taken enough precautions to prevent
the spread of viruses. However the company accepts no liability for any
damage caused by any virus transmitted by this email.
_


--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecar...@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ



Cache Size

2009-08-17 Thread manish rangankar
 Hi All,

How can we determine the size of cache?

For example, In UFS filesystem some cache is reserved for CG. I read
somewhere on the net that 10% of the total RAM is sufficient for handling
the heavy incoming data IO request!

I want to know like what all parameters are should be considered while
deciding a cache size, considering the worst case scenario i.e. heavy IO ?

- Manish R