lkml.org 
[lkml]   [2010]   [Jan]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [RFC][PATCH 6/8] mm: handle_speculative_fault()
    On Thu, 7 Jan 2010, Linus Torvalds wrote:

    > You're missing what Arjan said - the jav workload does a lot of memory
    > allocations too, causing mmap/munmap.

    Well isnt that tunable on the app level? Get bigger chunks of memory in
    order to reduce the frequency of mmap operations? If you want concurrency
    of faults then mmap_sem write locking currently needs to be limited.

    > So now some paths are indeed holding it for writing (or need to wait for
    > it to become writable). And the fairness of rwsems quite possibly then
    > impacts throughput a _lot_..

    Very true. Doing range locking (maybe using the split pte lock
    boundaries, shifting some state from mm_struct into vmas) may be a way to
    avoid hold mmap_sem for write in that case.

    > (Side note: I wonder if we should wake up _all_ readers when we wake up
    > any. Right now, we wake up all readers - but only until we hit a writer.
    > Which is the _fair_ thing to do, but it does mean that we can end up in
    > horrible patterns of alternating readers/writers, when it could be much
    > better to just say "release the hounds" and let all pending readers go
    > after a writer has had its turn).

    Have a cycle with concurrent readers followed by a cycle of serialized
    writers may be best under heavy load. The writers need to be limited in
    frequency otherwise they will starve the readers.


    \
     
     \ /
      Last update: 2010-01-07 17:39    [W:0.037 / U:0.332 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site