RE: RE: RE: RE: Re: Re: Implementation of Virtual Memory on Linux

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Mulyadi,

I tried to analyze the possibility of requesting a page from other memory
region, other than DMA.

In "linux/gfp.h"

#define __GFP_WAIT	0x10u	/* Can wait and reschedule? */
#define __GFP_HIGH	0x20u	/* Should access emergency pools? */
#define __GFP_IO	0x40u	/* Can start physical IO? */
#define __GFP_FS	0x80u	/* Can call down to low-level FS? */

I get the mode 0xd0 as

__GFP_WAIT | __GFP_IO | __GFP_FS

The lower nibble, which is 0, signifies that the memory request is from
Normal memory, I guess so, as again in "linux/gfp.h"

#define __GFP_DMA		0x01u
#define __GFP_HIGHMEM	0x02u

There is seemingly nothing as such __GFP_LOW or __GFP_NORMAL in
"linux/gfp.h".

Abu M. Muttalib
Associate,
Aftek Infosys Ltd.,
Pune, India
Office: 91-20-25449260-65 X-254
Email: abum@xxxxxxxxx

-----Original Message-----
From: Mulyadi Santosa [mailto:mulyadi.santosa@xxxxxxxxx]
Sent: Friday, May 19, 2006 5:50 PM
To: Abu M. Muttalib; kernelnewbies@xxxxxxxxxxxx
Subject: Re: RE: RE: RE: Re: Re: Implementation of Virtual Memory on
Linux


Hi Abu...

I check the output together with your C source code again. According to
this:
if(poarray==NULL)
		{
			printf("\nError in allocating\n");
			exit(1);
		}

and this:
if(p2 == NULL)
        	{
        		printf("OOM PROBLEM");
	        }

I should see those messages on the output log, but I find none. So IMHO
the failure of memory allocation didn't happen when you called
malloc()....however...

I see some message like these:
YoKu: PXA AC97 Driver loaded (5-Nov-05)
insmod: page allocation failure. order:5, mode:0xd0

Right after that, I found this:
DMA free:944kB min:512kB low:640kB high:768kB active:6444kB
inactive:1116kB present:16384kB pages_scanned:0 all_unreclaimable? no
lowmem_reserve[]: 0 0 0
Normal free:0kB min:0kB low:0kB high:0kB active:0kB inactive:0kB
present:0kB pages_scanned:0 all_unreclaimable? no
lowmem_reserve[]: 0 0 0
HighMem free:0kB min:128kB low:160kB high:192kB active:0kB inactive:0kB
present:0kB pages_scanned:0 all_unreclaimable? no
lowmem_reserve[]: 0 0 0
DMA: 106*4kB 11*8kB 5*16kB 3*32kB 2*64kB 1*128kB 0*256kB 0*512kB
0*1024kB = 944kB

So, I am thinking, could it be caused by such a kernel module asking for
bigger memory chunks than currently available? Or it simply asks memory
block other than DMA zone?

I am sorry if I can't help too much, it is up to you to use my advice to
pinpoint the real problem.

regards,

Mulyadi


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux