public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* vmscan.c: shrink_cache() doubt
@ 2001-12-29  8:18 alad
  2001-12-29  8:41 ` Andrew Morton
  0 siblings, 1 reply; 2+ messages in thread
From: alad @ 2001-12-29  8:18 UTC (permalink / raw)
  To: linux-kernel



In shrink_cache(), we have

          if (!page->buffers && (page_count(page) != 1 || !page->mapping))
               goto page_mapped;
          .
          .
          .
page_mapped:
          if (--max_mapped >=0)
               continue;


Assume page->buffers == NULL and page->count == 1, then why jump to page_mapped
if page->mapping == NULL ??

-- Amol




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: vmscan.c: shrink_cache() doubt
  2001-12-29  8:18 vmscan.c: shrink_cache() doubt alad
@ 2001-12-29  8:41 ` Andrew Morton
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Morton @ 2001-12-29  8:41 UTC (permalink / raw)
  To: alad; +Cc: linux-kernel

alad@hss.hns.com wrote:
> 
> In shrink_cache(), we have
> 
>           if (!page->buffers && (page_count(page) != 1 || !page->mapping))
>                goto page_mapped;
>           .
>           .
>           .
> page_mapped:
>           if (--max_mapped >=0)
>                continue;
> 
> Assume page->buffers == NULL and page->count == 1, then why jump to page_mapped
> if page->mapping == NULL ??
> 

These are anonymous pages - memory returned by malloc() rather
than by mmap().

Replace max_mapped with max_unfreeable and replace page_mapped
with page_unfreeable and it may make some sense.

-

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-12-29  8:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-12-29  8:18 vmscan.c: shrink_cache() doubt alad
2001-12-29  8:41 ` Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox