Picon

Re: swap storms on low memory i386, tasks blocked on i386 and amd64 for kernel > 2.6.36-git6

You can turn off SWAP and try ?
Are you using SWAP partition or file ?

Please search for following "phrase" in mailing list ... could this be
a issue in new release ?
"2.6.36 io bring the system to its knees"

__
Tharindu R Bamunuarachchi.

On Sun, Oct 31, 2010 at 5:50 PM, Mulyadi Santosa
<mulyadi.santosa <at> gmail.com> wrote:
> Hi Arthur..
>
> Interesting to read your (1st? really?) post, but I am not sure how
> far I can help...so I'll just take a shot...
>
> On Sun, Oct 31, 2010 at 18:36, Arthur Marsh
> <arthur.marsh <at> internode.on.net> wrote:
>> I have a PII-266 with 384 MiB RAM (maximum capacity for the machine) and
>> an AMD64 dual core with 4 GiB RAM, both running Debian unstable plus
>> some packages from experimental and custom kernels.
>>
>> A typical load for the PII-266 is KDE 3.5.10 with konversation, icedove,
>> iceweasel, xmms, lynx, hp-systray, top and aptitude-curses.
>>
>> This works with stock Debian kernels and custom kernels up to and
>> including 2.6.36-git6. Under heavy load, free RAM will hover around 5
>> MiB but audio will still play with a very occasional skip and all
>> applications are responsive.
(Continue reading)

Tapas Mishra | 1 Nov 2010 03:49
Picon

does get_user_byte and put_user_byte exist

I was reading an article
http://www.linuxjournal.com/article/1221
They have used get_user_byte and put_user_byte
functions do they exist?
I tried to man them but there were no entry.

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

loody | 1 Nov 2010 04:26
Picon

how to efficient use linux caches

Dear all:
I have some questions about virtual memory (VM) subsystem of the Linux
kernel.
1. From linux doc, there is drop_caches in /proc/ which can let us to
free the cache that kernel used, such as dentries and inodes, etc.
I know i can echo 1, 2 or 3 to free different level of caches in the
linux kernel, but is there any more elegant or programming rule that I
can follow to let it used more efficiently?

2. what kind of system call will increase the size of cache?
 I write a test program as below but from top, the size of cache seems
no change

#include<stdio.h>
#include<stdlib.h>
int main(void)
{
        int index;
        char input;
        char * point[1024];

        for(index=0;index<1024;index++)
        {
        point[index]=malloc(1024*1024);
        printf("please input any charter for going down:\n");
        scanf("%c",&input);
        }

}

(Continue reading)

Greg Freemyer | 1 Nov 2010 05:08
Picon
Gravatar

Re: how to efficient use linux caches

On Sun, Oct 31, 2010 at 11:26 PM, loody <miloody <at> gmail.com> wrote:
> Dear all:
> I have some questions about virtual memory (VM) subsystem of the Linux
> kernel.
> 1. From linux doc, there is drop_caches in /proc/ which can let us to
> free the cache that kernel used, such as dentries and inodes, etc.
> I know i can echo 1, 2 or 3 to free different level of caches in the
> linux kernel, but is there any more elegant or programming rule that I
> can follow to let it used more efficiently?

I think you fail to understand why drop_caches exists.  It is not to
enhance performance.  It is to enhance performance testing.

As such the main userspace api seems sufficient.

If you really want to control the cache, I think you need to implement
it in userspace for your app and do your disk i/o with o_direct.

> 2. what kind of system call will increase the size of cache?
>  I write a test program as below but from top, the size of cache seems
> no change
>
> #include<stdio.h>
> #include<stdlib.h>
> int main(void)
> {
>         int index;
>         char input;
>         char * point[1024];
>
(Continue reading)

Mulyadi Santosa | 1 Nov 2010 05:52
Picon

Re: looking for corrections/enhancements/omissions for LKD3

Hi Greg...

On Mon, Nov 1, 2010 at 10:21, Greg KH <greg <at> kroah.com> wrote:
> On Sun, Oct 31, 2010 at 08:18:52AM -0400, Robert P. J. Day wrote:
>> > Also, I saw XIP in ext2 filesystem. Quite neat..but again, why?
>>
>>   hmmm ... not sure, i'll look into that.
>
> So you can run Linux on a system with very limited amount of ram and
> your code running in rom or flash.

Make senses to me...thanks for the explanation greg. Anyway, why ext3
doesn't have similar feature?

--

-- 
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

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

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

Mulyadi Santosa | 1 Nov 2010 05:56
Picon

Re: does get_user_byte and put_user_byte exist

On Mon, Nov 1, 2010 at 09:49, Tapas Mishra <mightydreams <at> gmail.com> wrote:
> I was reading an article
> http://www.linuxjournal.com/article/1221
> They have used get_user_byte and put_user_byte
> functions do they exist?

Looking from the publication date of the mentioned article, quite
likely it's from 2.0.x or at least the beginning of 2.2.x era. LXR
confirms no such functions exist.

I think it's now called copy_from_user() and copy_to_user()

--

-- 
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

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

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

John Mahoney | 1 Nov 2010 06:01

Re: does get_user_byte and put_user_byte exist



On Sun, Oct 31, 2010 at 10:49 PM, Tapas Mishra <mightydreams <at> gmail.com> wrote:
I was reading an article
http://www.linuxjournal.com/article/1221
They have used get_user_byte and put_user_byte
functions do they exist?
I tried to man them but there were no entry.
 
That article is 1996 see: 

 

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


Rajat Sharma | 1 Nov 2010 06:19
Picon

Re: how to efficient use linux caches

> what kind of system call will increase the size of cache?

be clear about which cache? Are you interested in dentry cache, inode cache or page cache? dentry cache and inode cache can grow only by access to filesystem, access multiple files on your system. For page cache increase, you can simple copy a very large file say 1G.

> I write a test program as below but from top, the size of cache seems
no change

I didnt get the purpose of your test program, perhaps you want to put memory pressure on your system. What your test program is doing is just calling malloc, it does nothing but grow the virtual memory area of your heap, It wont allocate physical pages until you access the virtual address, try to write some bytes on each allocated memory such that each 4K page is accessed. This results in page vault in kernel and since your address is valid so it will allocate a page for you. Typically called Demand Paging.

If you really want to put memory pressure, try allocating memory in kernel through kmalloc.

Rajat

On Mon, Nov 1, 2010 at 8:56 AM, loody <miloody <at> gmail.com> wrote:
Dear all:
I have some questions about virtual memory (VM) subsystem of the Linux
kernel.
1. From linux doc, there is drop_caches in /proc/ which can let us to
free the cache that kernel used, such as dentries and inodes, etc.
I know i can echo 1, 2 or 3 to free different level of caches in the
linux kernel, but is there any more elegant or programming rule that I
can follow to let it used more efficiently?

2. what kind of system call will increase the size of cache?
 I write a test program as below but from top, the size of cache seems
no change

#include<stdio.h>
#include<stdlib.h>
int main(void)
{
        int index;
        char input;
        char * point[1024];

        for(index=0;index<1024;index++)
        {
        point[index]=malloc(1024*1024);
        printf("please input any charter for going down:\n");
        scanf("%c",&input);
        }

}

the memory usage of test.mips increased but the cached size is always
4916k as below:

Mem: 8352K used, 132800K free, 0K shrd, 60K buff, 4916K cached
Load average: 0.00 0.00 0.00
  PID USER     STATUS   VSZ  PPID %CPU %MEM COMMAND
  400 0        SW       668     1  0.3  0.4 busybox.telnetd
  498 0        RW       584   408  0.3  0.4 top
  500 0        SW     10156   317  0.0  7.1 test.mips
  317 0        SW       596     1  0.0  0.4 sh
  408 0        SW       592   400  0.0  0.4 sh
    1 0        SW       584     0  0.0  0.4 init
    5 0        SW<        0     2  0.0  0.0 khelper
   86 0        SW<        0     2  0.0  0.0 khubd
    3 0        SW<        0     2  0.0  0.0 ksoftirqd/0
   76 0        SW<        0     2  0.0  0.0 kblockd/0
    4 0        SW<        0     2  0.0  0.0 events/0
    2 0        SW<        0     0  0.0  0.0 kthreadd
  112 0        SW         0     2  0.0  0.0 pdflush
  113 0        SW<        0     2  0.0  0.0 kswapd0
    8 0        SW<        0     2  0.0  0.0 async/mgr
  116 0        SW<        0     2  0.0  0.0 crypto/0
  252 0        SW<        0     2  0.0  0.0 mtdblockd
  254 0        SW<        0     2  0.0  0.0 nftld
  255 0        SW<        0     2  0.0  0.0 inftld
  286 0        SW<        0     2  0.0  0.0 rpciod/0
  253 0        SW<        0     2  0.0  0.0 ftld
   89 0        SW<        0     2  0.0  0.0 kseriod
  111 0        SW         0     2  0.0  0.0 pdflush
  448 0        SW<        0     2  0.0  0.0 scsi_eh_1
  449 0        SW<        0     2  0.0  0.0 usb-storage
  114 0        SW<        0     2  0.0  0.0 nfsiod
  115 0        SW<        0     2  0.0  0.0 cifsoplockd

Mem: 8352K used, 132800K free, 0K shrd, 60K buff, 4916K cached
Load average: 0.04 0.01 0.00
  PID USER     STATUS   VSZ  PPID %CPU %MEM COMMAND
  501 0        RW       584   408  0.5  0.4 top
  400 0        SW       668     1  0.3  0.4 busybox.telnetd
  500 0        SW     37912   317  0.0 26.8 test.mips
  317 0        SW       596     1  0.0  0.4 sh
  408 0        SW       592   400  0.0  0.4 sh
    1 0        SW       584     0  0.0  0.4 init
    5 0        SW<        0     2  0.0  0.0 khelper
   86 0        SW<        0     2  0.0  0.0 khubd
    3 0        SW<        0     2  0.0  0.0 ksoftirqd/0
   76 0        SW<        0     2  0.0  0.0 kblockd/0
    4 0        SW<        0     2  0.0  0.0 events/0
    2 0        SW<        0     0  0.0  0.0 kthreadd
  112 0        SW         0     2  0.0  0.0 pdflush
  113 0        SW<        0     2  0.0  0.0 kswapd0
    8 0        SW<        0     2  0.0  0.0 async/mgr
  116 0        SW<        0     2  0.0  0.0 crypto/0
  252 0        SW<        0     2  0.0  0.0 mtdblockd
  254 0        SW<        0     2  0.0  0.0 nftld
  255 0        SW<        0     2  0.0  0.0 inftld
  286 0        SW<        0     2  0.0  0.0 rpciod/0
  253 0        SW<        0     2  0.0  0.0 ftld
   89 0        SW<        0     2  0.0  0.0 kseriod
  111 0        SW         0     2  0.0  0.0 pdflush
  448 0        SW<        0     2  0.0  0.0 scsi_eh_1
  449 0        SW<        0     2  0.0  0.0 usb-storage
  114 0        SW<        0     2  0.0  0.0 nfsiod
  115 0        SW<        0     2  0.0  0.0 cifsoplockd

appreciate your kind help,
miloody

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


Robert P. J. Day | 1 Nov 2010 07:36
Picon
Gravatar

Re: looking for corrections/enhancements/omissions for LKD3

On Sun, 31 Oct 2010, Greg KH wrote:

> On Sun, Oct 31, 2010 at 08:18:52AM -0400, Robert P. J. Day wrote:
> > > Also, I saw XIP in ext2 filesystem. Quite neat..but again, why?
> >
> >   hmmm ... not sure, i'll look into that.
>
> So you can run Linux on a system with very limited amount of ram and
> your code running in rom or flash.

  sorry, i didn't mean i'd look into *why* XIP exists, i'd look into
whether this was a new feature for ext2.

rday

--

-- 

========================================================================
Robert P. J. Day                               Waterloo, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================

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

Greg KH | 1 Nov 2010 04:21
Gravatar

Re: looking for corrections/enhancements/omissions for LKD3

On Sun, Oct 31, 2010 at 08:18:52AM -0400, Robert P. J. Day wrote:
> > Also, I saw XIP in ext2 filesystem. Quite neat..but again, why?
> 
>   hmmm ... not sure, i'll look into that.

So you can run Linux on a system with very limited amount of ram and
your code running in rom or flash.

greg k-h

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


Gmane