mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Re: subobj-rmap
@ 2003-04-07 23:00 Chuck Ebbert
  0 siblings, 0 replies; 13+ messages in thread
From: Chuck Ebbert @ 2003-04-07 23:00 UTC (permalink / raw)
  To: Davide Libenzi; +Cc: Rik van Riel, linux-kernel

Davide Libenzi wrote:

1) |----------------------|
2)     |-----------|
3) |--------------------------|
4)         |-----------|

R) |---|---|-------|---|--|---|

    1   1   1       1   1  3
    3   2   2       3   3
        3   3       4
            4


 How's this for an alogorithm for finding which
chunk of 'R' you have hit with a given memory reference:

 o  Use a bitmap to represent the whole address range.
 o  Set the bits that correspond the the first page
    of each subregion.

 To search:

 o  Look up the bit for the page you are interested in.
 o  Scan backwards for a 1.
 o  Convert bit position to address, this is the
    base of the subregion.

 Since this is i386-only you can play neat assembler
tricks with this code to make it fast.

 (OS/2 did/does it that way.)

--
 Chuck
 I am not a number!

^ permalink raw reply	[flat|nested] 13+ messages in thread
* Re: objrmap and vmtruncate
@ 2003-04-05  0:31 Andrew Morton
  2003-04-05  2:13 ` Martin J. Bligh
  0 siblings, 1 reply; 13+ messages in thread
From: Andrew Morton @ 2003-04-05  0:31 UTC (permalink / raw)
  To: Andrea Arcangeli; +Cc: mingo, hugh, dmccr, linux-kernel, linux-mm

Andrea Arcangeli <andrea@suse.de> wrote:
>
> the worst part IMHO is that it screwup the vma making the vma->vm_file
> totally wrong for the pages in the vma.

Not sure what you mean here.  All pages in the vma are backed by the file at
vm_file.  It is vm_pgoff which is meaningless.

As for your other concerns: yes, I hear you.  I suspect something will have
to give.  Ingo has a better feel for the problems which this code is solving
and hopefully he can comment.

Perhaps it is useful to itemise the prblems which we're trying to solve here:

- ZONE_NORMAL consumption by pte_chains

  Solved by objrmap and presumably page clustering.

- ZONE_NORMAL consumption by VMAs

  Solved by remap_file_pages.  Neither objrmap nor page clustering will
  help here.

- pte_chain setup and teardown CPU cost.

  objrmap does not seem to help.  Page clustering might, but is unlikely to
  be enabled on the machines which actually care about the overhead.

- get_unmapped_area() search complexity.

  Solved by remap_file_pages and by as-yet unimplemented algorithmic rework.

- pagefault frequency and TLB invalidation cost.

  Solved by MAP_POPULATE, could also be solved by MAP_PREFAULT (but it's
  not really a demonstrated problem).

Anything else?


So looking at the above, remap_file_pages() actually has pretty good
coverage.


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

end of thread, other threads:[~2003-04-07 22:53 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-07 23:00 subobj-rmap Chuck Ebbert
  -- strict thread matches above, loose matches on Subject: below --
2003-04-05  0:31 objrmap and vmtruncate Andrew Morton
2003-04-05  2:13 ` Martin J. Bligh
2003-04-05  2:44   ` Andrea Arcangeli
2003-04-05  3:24     ` Andrew Morton
2003-04-05 12:06       ` Andrew Morton
2003-04-06  2:23         ` Martin J. Bligh
2003-04-06 14:49           ` Alan Cox
2003-04-06 16:13             ` Martin J. Bligh
2003-04-06 21:34               ` subobj-rmap Martin J. Bligh
2003-04-06 21:42                 ` subobj-rmap Rik van Riel
2003-04-06 21:52                   ` subobj-rmap Davide Libenzi
2003-04-06 21:55                   ` subobj-rmap Jamie Lokier
2003-04-06 22:39                     ` subobj-rmap William Lee Irwin III
2003-04-06 22:03                   ` subobj-rmap Martin J. Bligh
2003-04-06 22:06                     ` subobj-rmap Martin J. Bligh
2003-04-06 22:15                     ` subobj-rmap Andrea Arcangeli
2003-04-06 22:25                       ` subobj-rmap Martin J. Bligh
2003-04-07 21:25                         ` subobj-rmap Andrea Arcangeli
2003-04-06 23:06                     ` subobj-rmap Jamie Lokier
2003-04-06 23:26                       ` subobj-rmap Martin J. Bligh

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

all inboxes | Powered by JetHome®