#
435c43f5 |
|
02-Jun-2010 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* Introduced type generic_io_vec, which is similar to iovec, but uses types that are wide enough for both virtual and physical addresses. * DMABuffer, IORequest, IOScheduler,... and code using them: Use generic_io_vec and generic_{addr,size}_t where necessary. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36997 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
03768a40 |
|
31-May-2010 |
Axel Dörfler <axeld@pinc-software.de> |
* Introduced IOScheduler::MediaChanged() - this is now called by scsi_cd instead of having the logic be triggered by IOScheduler::SetDeviceCapacity(), as that one might actually be called more often (for each call to update_capacity(), ie. each B_GET_GEOMETRY/B_GET_DEVICE_SIZE will trigger it), and there is no reason to throw away the cache every time (will make a difference during partition/file system detection). * In cd_init_device() just call update_capacity() instead of duplicating its code. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36986 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
2eab5420 |
|
26-Apr-2010 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Added SetDeviceCapacity() method. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36493 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
0715529b |
|
26-Apr-2010 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Renamed IOScheduler to IOSchedulerSimple and pulled an interface IOScheduler out of it. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36492 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
7aba4e40 |
|
26-Apr-2010 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Moved IOSchedulerRoster into its own header/source files. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36491 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
04b174ca |
|
21-Apr-2010 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* Moved IOCallback class into separate source file. * Moved IOScheduler::_IOCallbackWrapper() to IOCallback::WrapperFunction(). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36394 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
ade3a199 |
|
25-Dec-2009 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Already assigned the IOScheduler's ID in the constructor and use it in the names of its threads. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34770 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
1c12dcb5 |
|
21-Dec-2009 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
IOSchedulerRoster: * Lock the notification service and check HasListeners(), so we don't prepare an event message needlessly. * The on-stack buffer for the event message was too small for I/O operation related events. Now a larger buffer belonging to the roster object is used. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34737 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
ca77afe7 |
|
19-Dec-2009 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* Implemented missing cleanup when an IOScheduler is destroyed. The threads weren't terminated orderly. * IOScheduler now stores its name and gets a unique ID. * Added IOSchedulerRoster singleton which registers all IOSchedulers. It also provides a notification service. We generate interesting events for IOSchedulers, IORequests, and IOOperations. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34702 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
5147963d |
|
26-Jul-2009 |
Stephan Aßmus <superstippi@gmx.de> |
headers/private/kernel/util/OpenHashTable.h, Hugo's version, is a bit nicer than Tracker's OpenHashTable.h which it should eventually replace. We've renamed the class to BOpenHashTable and changed the interface slightly so that HashTableLink became superfluous. Adapted all the code that used it. Since the OpenHashTables no longer clash, this should fix the GCC4 build. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31791 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
aa4ba93e |
|
08-Mar-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
|
#
b50e6202 |
|
02-Oct-2008 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Fixed various warnings. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27841 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
0316483f |
|
27-Aug-2008 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* DMAResource::TranslateNext(): Added parameter to limit the maximum operation length. * IORequest: Added owner (IORequestOwner). Also added a SetUnfinished() method, which is invoked by the I/O scheduler after all operations of the request have been finished, but the request isn't done yet. * Added debugger commands "io_request_owner" and "io_scheduler" printing information for a IORequestOwner and IOScheduler object respectively. * Implemented an actual I/O scheduling algorithm. It's a simple round robin strategy (a queue per thread) with a unidirectional elevator serializing the operations. ATM priorities are ignored, the bandwidth isn't adjusted to the device, and there are TODOs all over the place. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27216 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
de5fcb8a |
|
24-Aug-2008 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* The IOScheduler does not create as many operations as it can before executing them. Doesn't really make any difference ATM. * Handle B_BUSY returned by DMAResource::TranslateNext() correctly. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27186 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
5c8d420b |
|
19-Aug-2008 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* Added "bool wait" parameter to _GetOperation(). If false and no unused operation is available ATM, it will return NULL. * _Finisher() does now re-schedule a request, if all of its operations finished successfully, but there are still remaining bytes. * _Scheduler() does now operate in two passes. First it creates as many operations for a given request as possible, then it executes the operations. This fixes bug #2644. The problem was that by creating and executing the operations in a single loop, an operation could be finished before the next one was added. The request would thus be considered finished and the request owner be notified. This would usually lead to the destruction of the request while it was still in use. * _Scheduler(): In case we don't have a DMA resource also advance the request. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27070 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
7f12cc54 |
|
30-Jul-2008 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* It is now supported that I/O operations and requests are only handled partially (e.g. due to hitting the end of file). The respective classes have grown new methods and attributes to deal with that. The "finished" callbacks have got additional parameters to indicate whether the transfer was only partial and how much has been transferred. Other callbacks and functions have a size_t* in/out parameter instead of a simple size_t, now. * vfs_{read,write}_pages() do now use the I/O request framework instead of the underlying FS's {read,write}_pages() hooks (those should be unused now). Furthermore they've got an additional "flags" parameter, which is passed to IORequest::Init(), i.e. it allows to specify that the given vecs refer to physical addresses. * The file cache's read_into_cache() reads directly into physical pages, now. * Fixed bug in DoIO::IO(): The offset was not adjusted, so that all pages were incorrectly transferred from/to the same location. * Fixed broken subrequest scheduling loop head in do_iterative_fd_io_iterate(). * Adjusted the test driver and implemented its io() hook. Using this driver I/O requests are passed all the way from the VFS/VM to the driver and through the I/O scheduler. It even seems to work. :-) * Added missing const to the iovec* parameter of the IORequest::Init() methods. * Disabled some debug output by default. Added new optional debug output. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26692 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
8c980485 |
|
25-Jul-2008 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* Added support for an iteration callback in IORequest. * Split IORequest::ChunkFinished() into OperationFinished() and and SubrequestFinished(). Moved the notification part into a new method NotifyFinished(). * Added new IOScheduler thread for notifying finished requests. IOScheduler::_Finisher() hands over finished request to it, unless the requests don't have callbacks. We need the separate thread, since the callbacks can potentially reenter the scheduler and thus cause deadlocks. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26631 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
902559ce |
|
23-Jul-2008 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* Added a mutex to IORequest. It doesn't look like we can get around using a lock and I'm not very much in favor of a global one. * Added "finished" callback to IORequest. * IOOperation::Finish() no longer invokes its parent request's ChunkFinished(). The finisher does this instead. ChunkFinished() can optionally remove the chunk from the parent. * Added IORequest::Wait() which waits for the completion of the request. * Introduced IORequestChunk::ResetStatus() to make setting the status to "pending" somewhat more explicit. * Implemented the missing IOScheduler::SetCallback() methods. * The NotifyAll() calls on the IOScheduler's condition variables were missing, so it just waited forever. * Added some more debug output. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26597 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
b71e6319 |
|
23-Jul-2008 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* Fixed race condition between OperationCompleted() and the scheduler thread. Interrupting a thread only works when it is already waiting. We do now use a flag to indicate whether the scheduler thread is waiting (avoids thread_interrupt() calls when the thread is in driver code). Furthermore before starting to wait, we check whether any finisher work has to be done -- we do that (and the addition of the entry to the condition variable) with the finisher lock being held to avoid the race condition. * Moved waiting for and getting the next unscheduled request into new method _GetNextUnscheduledRequest(). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26594 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
6969690a |
|
18-Jul-2008 |
Axel Dörfler <axeld@pinc-software.de> |
bonefish + axeld: * Moved the old I/O scheduler code into the device manager, and replaced its contents completely :-) * Implemented the DMA and I/O requests/scheduler framework - for now in C++ only. It's a work in progress and not used anywhere yet. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26488 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
435c43f5912b109e7d5cf682865d2061e62fad8c |
|
02-Jun-2010 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* Introduced type generic_io_vec, which is similar to iovec, but uses types that are wide enough for both virtual and physical addresses. * DMABuffer, IORequest, IOScheduler,... and code using them: Use generic_io_vec and generic_{addr,size}_t where necessary. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36997 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
03768a405289a006f256465ea93a87faed5ea339 |
|
31-May-2010 |
Axel Dörfler <axeld@pinc-software.de> |
* Introduced IOScheduler::MediaChanged() - this is now called by scsi_cd instead of having the logic be triggered by IOScheduler::SetDeviceCapacity(), as that one might actually be called more often (for each call to update_capacity(), ie. each B_GET_GEOMETRY/B_GET_DEVICE_SIZE will trigger it), and there is no reason to throw away the cache every time (will make a difference during partition/file system detection). * In cd_init_device() just call update_capacity() instead of duplicating its code. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36986 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
2eab54201c8258d53643a2c2eeb504c8218f3a62 |
|
26-Apr-2010 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Added SetDeviceCapacity() method. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36493 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
0715529b59a3965beea04288a564458225d6f470 |
|
26-Apr-2010 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Renamed IOScheduler to IOSchedulerSimple and pulled an interface IOScheduler out of it. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36492 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
7aba4e400ed69d328320c4fcda1617f759e98707 |
|
26-Apr-2010 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Moved IOSchedulerRoster into its own header/source files. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36491 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
04b174ca25bb106f620a42500413c3d4a38fe0c5 |
|
21-Apr-2010 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* Moved IOCallback class into separate source file. * Moved IOScheduler::_IOCallbackWrapper() to IOCallback::WrapperFunction(). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36394 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
ade3a199a6a941079907def0744f1f4b9ff86a50 |
|
25-Dec-2009 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Already assigned the IOScheduler's ID in the constructor and use it in the names of its threads. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34770 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
1c12dcb598d5ddbc792b24e6210c6f102ff85a5b |
|
21-Dec-2009 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
IOSchedulerRoster: * Lock the notification service and check HasListeners(), so we don't prepare an event message needlessly. * The on-stack buffer for the event message was too small for I/O operation related events. Now a larger buffer belonging to the roster object is used. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34737 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
ca77afe75f10f5c4fbc6c328de231c1572980d34 |
|
19-Dec-2009 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* Implemented missing cleanup when an IOScheduler is destroyed. The threads weren't terminated orderly. * IOScheduler now stores its name and gets a unique ID. * Added IOSchedulerRoster singleton which registers all IOSchedulers. It also provides a notification service. We generate interesting events for IOSchedulers, IORequests, and IOOperations. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34702 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
5147963dcd57fefa4f63c484eb88e9eaf4002976 |
|
26-Jul-2009 |
Stephan Aßmus <superstippi@gmx.de> |
headers/private/kernel/util/OpenHashTable.h, Hugo's version, is a bit nicer than Tracker's OpenHashTable.h which it should eventually replace. We've renamed the class to BOpenHashTable and changed the interface slightly so that HashTableLink became superfluous. Adapted all the code that used it. Since the OpenHashTables no longer clash, this should fix the GCC4 build. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31791 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
aa4ba93e25c1c63730ba69e04d3d96c3253924fd |
|
08-Mar-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
|
#
b50e620202c4faf76869721957973c0f72e83155 |
|
02-Oct-2008 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Fixed various warnings. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27841 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
0316483f0ade2904583955b57cc396bf060f9027 |
|
27-Aug-2008 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* DMAResource::TranslateNext(): Added parameter to limit the maximum operation length. * IORequest: Added owner (IORequestOwner). Also added a SetUnfinished() method, which is invoked by the I/O scheduler after all operations of the request have been finished, but the request isn't done yet. * Added debugger commands "io_request_owner" and "io_scheduler" printing information for a IORequestOwner and IOScheduler object respectively. * Implemented an actual I/O scheduling algorithm. It's a simple round robin strategy (a queue per thread) with a unidirectional elevator serializing the operations. ATM priorities are ignored, the bandwidth isn't adjusted to the device, and there are TODOs all over the place. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27216 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
de5fcb8ab4051dd733f80ca55e32c72a4cd2fc0c |
|
24-Aug-2008 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* The IOScheduler does not create as many operations as it can before executing them. Doesn't really make any difference ATM. * Handle B_BUSY returned by DMAResource::TranslateNext() correctly. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27186 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
5c8d420b7c2a26b7153114396e6d0c4c1641dd3d |
|
19-Aug-2008 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* Added "bool wait" parameter to _GetOperation(). If false and no unused operation is available ATM, it will return NULL. * _Finisher() does now re-schedule a request, if all of its operations finished successfully, but there are still remaining bytes. * _Scheduler() does now operate in two passes. First it creates as many operations for a given request as possible, then it executes the operations. This fixes bug #2644. The problem was that by creating and executing the operations in a single loop, an operation could be finished before the next one was added. The request would thus be considered finished and the request owner be notified. This would usually lead to the destruction of the request while it was still in use. * _Scheduler(): In case we don't have a DMA resource also advance the request. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27070 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
7f12cc54a729622cd04940ee9400958413d99b21 |
|
30-Jul-2008 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* It is now supported that I/O operations and requests are only handled partially (e.g. due to hitting the end of file). The respective classes have grown new methods and attributes to deal with that. The "finished" callbacks have got additional parameters to indicate whether the transfer was only partial and how much has been transferred. Other callbacks and functions have a size_t* in/out parameter instead of a simple size_t, now. * vfs_{read,write}_pages() do now use the I/O request framework instead of the underlying FS's {read,write}_pages() hooks (those should be unused now). Furthermore they've got an additional "flags" parameter, which is passed to IORequest::Init(), i.e. it allows to specify that the given vecs refer to physical addresses. * The file cache's read_into_cache() reads directly into physical pages, now. * Fixed bug in DoIO::IO(): The offset was not adjusted, so that all pages were incorrectly transferred from/to the same location. * Fixed broken subrequest scheduling loop head in do_iterative_fd_io_iterate(). * Adjusted the test driver and implemented its io() hook. Using this driver I/O requests are passed all the way from the VFS/VM to the driver and through the I/O scheduler. It even seems to work. :-) * Added missing const to the iovec* parameter of the IORequest::Init() methods. * Disabled some debug output by default. Added new optional debug output. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26692 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
8c9804851b27127f5741c9a667397ab269d4cc53 |
|
25-Jul-2008 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* Added support for an iteration callback in IORequest. * Split IORequest::ChunkFinished() into OperationFinished() and and SubrequestFinished(). Moved the notification part into a new method NotifyFinished(). * Added new IOScheduler thread for notifying finished requests. IOScheduler::_Finisher() hands over finished request to it, unless the requests don't have callbacks. We need the separate thread, since the callbacks can potentially reenter the scheduler and thus cause deadlocks. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26631 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
902559ce32c16724ad24cfa90582097ba8d6fd43 |
|
23-Jul-2008 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* Added a mutex to IORequest. It doesn't look like we can get around using a lock and I'm not very much in favor of a global one. * Added "finished" callback to IORequest. * IOOperation::Finish() no longer invokes its parent request's ChunkFinished(). The finisher does this instead. ChunkFinished() can optionally remove the chunk from the parent. * Added IORequest::Wait() which waits for the completion of the request. * Introduced IORequestChunk::ResetStatus() to make setting the status to "pending" somewhat more explicit. * Implemented the missing IOScheduler::SetCallback() methods. * The NotifyAll() calls on the IOScheduler's condition variables were missing, so it just waited forever. * Added some more debug output. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26597 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
b71e631972d3563641f621a2b0f58def53e334c6 |
|
23-Jul-2008 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* Fixed race condition between OperationCompleted() and the scheduler thread. Interrupting a thread only works when it is already waiting. We do now use a flag to indicate whether the scheduler thread is waiting (avoids thread_interrupt() calls when the thread is in driver code). Furthermore before starting to wait, we check whether any finisher work has to be done -- we do that (and the addition of the entry to the condition variable) with the finisher lock being held to avoid the race condition. * Moved waiting for and getting the next unscheduled request into new method _GetNextUnscheduledRequest(). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26594 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
6969690afee7ab446c14e04011cf5cadedb09c1b |
|
18-Jul-2008 |
Axel Dörfler <axeld@pinc-software.de> |
bonefish + axeld: * Moved the old I/O scheduler code into the device manager, and replaced its contents completely :-) * Implemented the DMA and I/O requests/scheduler framework - for now in C++ only. It's a work in progress and not used anywhere yet. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26488 a95241bf-73f2-0310-859d-f6bbb57e9c96
|