My kernel version is 2.6.25 and I use the DirectFB1.0.0. In DirectFB1.0.0, I can't configure the 'no-madv-remove' in directfbrc. So, I commented out below code such as, ---------------------------------------------------------------------------- if (fusion_config->madv_remove) // madvise( ADDRESS(block), blocks * BLOCKSIZE, MADV_REMOVE );
Would you explain more detail about this function? 1. The reason why this function is added in DirectFB source 2. The functionality of this function. I found out this function's manual in web but I don't understand this function exactly because of lack of kernel experience. 3. Is there any side effect if I remove this function? My question is not how to remove this function in terms of DirectFB. I am eager to know there is no side effect in my system when removing this function. -----Original Message----- From: Niels Roest [mailto:[EMAIL PROTECTED] Sent: Thursday, October 16, 2008 6:11 PM To: [EMAIL PROTECTED] Cc: directfb-dev@directfb.org Subject: Re: [directfb-dev] Is is possible to remove the madvise() function? Yes, you can remove madvise, it is not necessary for operation. It is intended for memory performance. Since it has converse consequences in your case, you can add this to your directfbrc: no-madv-remove Can you please send me your DirectFB output? I am mostly interested if you have a line with Fusion/SHM: Using MADV_REMOVE(xxx) and what is between the xxx's. Greets Niels Inpyo Kang wrote: > > Hello All. > > I meet the performance problem about madvise() function in DFB1.0.0 > > This function consumes the 50ms time in my target device. > > In my previous target device, it takes just 1ms. > > This function is called many times when application is running. > > So I MUST remove this function if I can't resolve this problem in > kernel side. > > I'd like to know it is O.K although I remove this function. > > In DirectFB 1.3, this function seems to be optional. > > That is, if set the 'madv-remove' in config file, madvise() functions > is not called. > > This function is defined in \lib\fusion\shm\heap.c:_fusion_shfree() in > DFB1.0.0 > > /* FIXME: as this is used when kernel is detected as >= 2.6.19.2 only, > this fallback definition should be ok for now */ > > #ifndef MADV_REMOVE > > #define MADV_REMOVE 9 > > #endif > > /* Punch a hole into the tmpfs file to really free RAM. */ > > if (fusion_config->madv_remove) > > madvise( ADDRESS(block), blocks * BLOCKSIZE, MADV_REMOVE ); > > ================================= > > Inpyo Kang > > Linux Lab, Open OS S/W Group > > Mobile R&D, Samsung Electronics > > -------------------------------- > > Office : +82-31-301-7675 > > H.P : +82-10-7260-8850 > > E-mail : [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > > ================================= > > ------------------------------------------------------------------------ > > _______________________________________________ > directfb-dev mailing list > directfb-dev@directfb.org > http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev > -- .------------------------------------------. | DirectFB - Hardware accelerated graphics | | http://www.directfb.org/ | "------------------------------------------" _______________________________________________ directfb-dev mailing list directfb-dev@directfb.org http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev