Searched +hist:11 +hist:a3346c (Results 1 - 1 of 1) sorted by relevance

/haiku/src/system/kernel/cache/
H A Dfile_cache.cppdiff 8ba0b5eb Sun May 17 11:22:29 MDT 2020 Augustin Cavalier <waddlesplash@gmail.com> kernel/file_cache: Properly size I/O request vectors when writing zeros.

Should fix #16039.

Change-Id: Ifc5c79354979aaa7b27b09acc6d6450e21146e76
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2727
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
diff f8154d17 Wed Nov 02 15:14:11 MDT 2011 Ingo Weinhold <ingo_weinhold@gmx.de> mmlr (distracted) + bonefish:
* Turn VMCache::consumers C list into a DoublyLinkedList.
* Use object caches for the different VMCache types and the VMCacheRefs.
The purpose is to reduce slab area fragmentation.
* Requires the introduction of a pure virtual VMCache::DeleteObject()
method, implemented in the derived classes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@43133 a95241bf-73f2-0310-859d-f6bbb57e9c96
diff 40bb9481 Wed Feb 03 11:53:52 MST 2010 Ingo Weinhold <ingo_weinhold@gmx.de> * Removed useless return parameter from vm_remove_all_page_mappings().
* Added vm_clear_page_mapping_accessed_flags() and
vm_remove_all_page_mappings_if_unaccessed(), which combine the functionality
of vm_test_map_activation(), vm_clear_map_flags(), and
vm_remove_all_page_mappings(), thus saving lots of calls to translation map
methods. The backend is the new method
VMTranslationMap::ClearAccessedAndModified().
* Started to make use of the cached page queue and changed the meaning of the
other non-free queues slightly:
- Active queue: Contains mapped pages that have been used recently.
- Inactive queue: Contains mapped pages that have not been used recently. Also
contains unmapped temporary pages.
- Modified queue: Contains unmapped modified pages.
- Cached queue: Contains unmapped unmodified pages (LRU sorted).
Unless we're actually low on memory and actively do paging, modified and
cached queues only contain non-temporary pages. Cached pages are considered
quasi free. They still belong to a cache, but since they are unmodified and
unmapped, they can be freed immediately. And this is what
vm_page_[try_]reserve_pages() do now when there are no more actually free
pages at hand. Essentially this means that pages storing cached file data,
unless mmap()ped, no longer are considered used and don't contribute to page
pressure. Paging will not happen as long there are enough free + cached pages
available.
* Reimplemented the page daemon. It no longer scans all pages, but instead works
the page queues. As long as the free pages situation is harmless, it only
iterates through the active queue and deactivates pages that have not been
used recently. When paging occurs it additionally scans the inactive queue and
frees pages that have not been used recently.
* Changed the page reservation/allocation interface:
vm_page_[try_]reserve_pages(), vm_page_unreserve_pages(), and
vm_page_allocate_page() now take a vm_page_reservation structure pointer.
The reservation functions initialize the structure -- currently consisting
only of a count member for the number of still reserved pages.
vm_page_allocate_page() decrements the count and vm_page_unreserve_pages()
unreserves the remaining pages (if any). Advantages are that reservation/
unreservation mismatches cannot occur anymore, that vm_page_allocate_page()
can verify that the caller has indeed a reserved page left, and that there's
no unnecessary pressure on the free page pool anymore. The only disadvantage
is that the vm_page_reservation object needs to be passed around a bit.
* Reworked the page reservation implementation:
- Got rid of sSystemReservedPages and sPageDeficit. Instead
sUnreservedFreePages now actually contains the number of free pages that
have not yet been reserved (it cannot become negative anymore) and the new
sUnsatisfiedPageReservations contains the number of pages that are still
needed for reservation.
- Threads waiting for reservations do now add themselves to a waiter queue,
which is ordered by descending priority (VM priority and thread priority).
High priority waiters are served first when pages become available.
Fixes #5328.
* cache_prefetch_vnode(): Would reserve one less page than allocated later, if
the size wasn't page aligned.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35393 a95241bf-73f2-0310-859d-f6bbb57e9c96
diff e50cf876 Wed Dec 02 11:05:10 MST 2009 Ingo Weinhold <ingo_weinhold@gmx.de> * Moved the VM headers into subdirectory vm/.
* Renamed vm_cache.h/vm_address_space.h to VMCache.h/VMAddressSpace.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34449 a95241bf-73f2-0310-859d-f6bbb57e9c96
diff 61b6f38c Fri Jul 31 08:11:12 MDT 2009 Axel Dörfler <axeld@pinc-software.de> * Cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32021 a95241bf-73f2-0310-859d-f6bbb57e9c96
diff aa4ba93e Sun Mar 08 11:30:37 MDT 2009 Ingo Weinhold <ingo_weinhold@gmx.de> * Renamed src/system/kernel/device_manager/io_requests.{h,cpp} to
IORequest.{h,cpp}.
* Introduced public <io_requests.h> header. Currently it only declares the
single function BFS uses.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29446 a95241bf-73f2-0310-859d-f6bbb57e9c96
diff 1b6eff28 Sat Oct 11 14:55:32 MDT 2008 Ingo Weinhold <ingo_weinhold@gmx.de> * Replaced the vm_get_physical_page() "flags"
PHYSICAL_PAGE_{NO,CAN}_WAIT into an actual flag
PHYSICAL_PAGE_DONT_WAIT.
* Pass the flags through to the chunk mapper callback.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27979 a95241bf-73f2-0310-859d-f6bbb57e9c96
diff 8e0f884c Wed Sep 26 11:42:25 MDT 2007 Axel Dörfler <axeld@pinc-software.de> * Since the page scanner and thief can work more effectively when no vm_caches
are locked, there is now a vm_page_reserve_pages() call to ensure upfront that
there is a page for me when I need it, and may have locked some caches.
* The vm_soft_fault() routine now makes use of that feature.
* vm_page_allocate_page() now resets the vm_page::usage_count, so that the file
cache does not need to do this in read_chunk_into_cache() and
write_chunk_to_cache().
* In cache_io() however, it need to update the usage_count - and it does that
now. Since non-mapped caches don't have mappings, the page scanner will punish
the cache pages stronger than other pages which is accidently just what we
want.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22319 a95241bf-73f2-0310-859d-f6bbb57e9c96
diff e4b4574f Sun Mar 11 18:23:45 MDT 2007 Ingo Weinhold <ingo_weinhold@gmx.de> Reordered somewhat unhealthy looking if-construct (first
"currentPage->state == ..." then "currentPage != NULL").


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20377 a95241bf-73f2-0310-859d-f6bbb57e9c96
diff 8645479b Tue Apr 11 12:48:04 MDT 2006 Axel Dörfler <axeld@pinc-software.de> * cache_io() could insert a second page at the same position in the vm_cache
since it unlocked the cache while waiting on a busy page. Now, we're filling
the pending request before unlocking the cache.
* Fixed the deadlock I mentioned in the last commit: if a page fault happens
at the same time we're trying to read/write from/to a page, we no longer
fight for the BFS inode lock, but eventually doing the job twice if needed.
Will need to go over the "write modified" functions to make sure they are
behaving as well.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17091 a95241bf-73f2-0310-859d-f6bbb57e9c96

Completed in 48 milliseconds