summaryrefslogtreecommitdiffstats
path: root/xlators/performance/io-threads/src
Commit message (Collapse)AuthorAgeFilesLines
* Changed occurrences of Z Research to Gluster.Vijay Bellur2009-10-072-2/+2
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* io-threads: Clarify thread count rangeShehjar Tikoo2009-05-052-16/+23
| | | | | | | | | | | | | | | This patch cleans up io-threads behaviour regarding the range values that can be specified for min-threads and max-threads. THe major change is that the min threads have been reduced to 2 to signify that io-threads needs minimum two threads for its operation, while keeping the default number of threads at 16. The idea is to decouple the default thread count from the minimum thread count. Note to Avati: This applies over Raghu's indentation and logging take-3 patch. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* io-threads: indentation and logging fixesRaghavendra G2009-05-052-199/+250
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* io-threads: Add fxattrop fopShehjar Tikoo2009-04-221-666/+565
| | | | | | -- added some indentation fixes Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* io-threads: Add xattrop fopShehjar Tikoo2009-04-221-0/+44
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* io-threads: Add readdir fopShehjar Tikoo2009-04-221-0/+36
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* io-threads: Add removexattr fopShehjar Tikoo2009-04-221-0/+45
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* io-threads: Add fsetxattr fopShehjar Tikoo2009-04-221-0/+35
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* io-threads: Add fgetxattr fopShehjar Tikoo2009-04-221-0/+34
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* io-threads: Add getxattr fopShehjar Tikoo2009-04-221-0/+44
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* io-threads: Add setxattr fopShehjar Tikoo2009-04-221-0/+45
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* io-threads: Add statfs fopShehjar Tikoo2009-04-221-1/+34
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* io-threads: Add fsyncdir fopShehjar Tikoo2009-04-221-0/+34
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* io-threads: Add opendir fopShehjar Tikoo2009-04-221-0/+34
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* io-threads: Add link fopShehjar Tikoo2009-04-221-0/+37
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* io-threads: Remove unnecessary call to pthread_attr_setstacksizeShehjar Tikoo2009-04-121-4/+0
| | | | | | | We do not need to explicitly set the stack size to its default value. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* updated performance/io-threads with new readv writev prototypesAnand V. Avati2009-04-121-6/+10
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* io-threads: Reduce default min and max threadsShehjar Tikoo2009-04-101-2/+2
| | | | | | | | Going by the memory usage for each threads, it is prudent to have lower number of threads by default and let users who understand the memory consequences increase the thread count for themselves. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* io-threads: Use non-default thread stack sizeShehjar Tikoo2009-04-102-1/+27
| | | | | | | | The default stack size on Linux is around 8 MiB for each thread. This is clearly too high for our purpose. This commit reduces the stack size down to 1 MiB. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* io-threads: Refactor un-ordered worker exit pathShehjar Tikoo2009-04-081-33/+17
| | | | | | | This is being done for the same reason as the previous refactoring for ordered threads. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* io-threads: Refactor ordered worker exit pathShehjar Tikoo2009-04-081-34/+25
| | | | | | | | | | | | | | This patch re-factors the exit path of an ordered worker on a time-out. Earlier we're checking for exit permission in such a way that required us to release and acquire the worker lock a second time in the worker loop opening a window wherein a new request could've been appended to the request queue. This patch makes the decision to exit while still holding on to the worker lock. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* io-threads: Cleaner stub destructionShehjar Tikoo2009-04-061-0/+3
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* io-threads: Sanity check worker thread idxShehjar Tikoo2009-04-061-20/+62
| | | | | | | | This patch adds sanity check for the ordered worker thread index returned from the inode's context. If the index is corrupted we STACK_UNWIND with ECANCELED. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* io-threads: Support autoscaling volfile optionsShehjar Tikoo2009-04-022-24/+104
| | | | | | | | | | | | | | | | | This commit finally makes the autoscaling feature visible to the user. Know that we're now using two separate thread-pools, one for data requests, called ordered thread-pool in io-threads, and the other for meta-data requests, called un-ordered thread-pool. We do not expose this information to the user to keep io-threads simple. Consequently, when the user specifies a min-threads and max-threads value, the number of threads assigned to each pool is equal, i.e. both pools start with their min threads set to half of the option "min-threads" and both scale up their threads at most up to half of option "max-threads". Volfile options will be added to the wiki and user-guide. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* io-threads: Cleanup request queueing,thread firingShehjar Tikoo2009-04-021-30/+38
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* io-threads: Allow scaling to be switched offShehjar Tikoo2009-04-022-11/+73
| | | | | | | | The default is also to provide no scaling. For both, ordered and unordered request pools, when scaling is off, we maintain atleast the minimum number of threads specified in the volfile. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* io-threads: Add ordered threadpool state and codeShehjar Tikoo2009-04-022-58/+182
| | | | | | | | | | | Now we have the remaining fops going through the ordered thread-pool. To route a request through ordered thread, we use iot_schedule_ordered(..) and the worker thread for ordered requests is iot_worker_ordered(..) Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* io-threads: Add un-ordered thread-pool.Shehjar Tikoo2009-04-022-98/+334
| | | | | | | | | | | | | | | | | | This commit adds everything needed to: a. Get un-ordered request going through the un-ordered thread-pool. This happens through, the iot_schedule_unordered(..). The unordered thread-pool consists of thread running the iot_worker_unordered(..) function. b. Make threads in the un-ordered thread pool start-up and exit depending on the thread state. Note that at this point the requests that need ordering are still going through iot_schedule(..). Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* io-threads: Classify requests for threadpool typeShehjar Tikoo2009-04-021-26/+33
| | | | | | | | | | | | | | | | | New io-threads will serve requests through two separate threadpools. One thread pool for requests that must be ordered on a file that is open. so that the server can process the requests in the order they were entered in the requests queue, and not in the order the io-thread is able to send a request, which in turn is determined by how the thread gets scheduled. This can also be called the data-intensive ops thread pool. Second thread-pool for requests that dont care about ordering, i.e. requests like lookup, open, create, mkdir, etc. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* io-threads: Wire in support for rename fopShehjar Tikoo2009-04-021-0/+55
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* io-threads: Wire in support for symlink fopShehjar Tikoo2009-04-021-0/+53
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* io-threads: Wire in support for rmdir fopShehjar Tikoo2009-04-021-0/+40
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* io-threads: Wire in support for mkdir fopShehjar Tikoo2009-04-021-0/+44
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* io-threads: Wire in support for mknod fopShehjar Tikoo2009-04-021-0/+47
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* io-threads: Wire in support for readlink fopShehjar Tikoo2009-04-021-0/+43
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* io-threads: Wire in support for access fopShehjar Tikoo2009-04-021-0/+43
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* io-threads: Wire in support for fchown fopShehjar Tikoo2009-04-021-0/+46
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* io-threads: Wire in support for chownShehjar Tikoo2009-04-021-0/+46
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* io-threads: Wire in support for fchmod fopShehjar Tikoo2009-04-021-0/+43
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* io-threads: Wire in support for chmod fopShehjar Tikoo2009-04-021-0/+42
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* io-threads: Wire in support for lookup fopShehjar Tikoo2009-04-021-0/+46
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* fix a segfault with io-threads when iot-schedule is called with NULL inodeAmar Tumballi2009-04-011-1/+2
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* Add return after STACK_UNWINDShehjar Tikoo2009-03-181-0/+2
| | | | | | | | We must add a 'return' after a STACK_UNWIND due to a stub creation failure, because if we dont, we'll end up adding a NULL stub to the worker thread request queue. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* IO-threads Cleanup: Remove useless data structures.Shehjar Tikoo2009-03-172-109/+0
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* IO-threads Cleanup: Clean-up request scheduling and queueing interface.Shehjar Tikoo2009-03-171-216/+61
| | | | | | | | | | | | | | | | | | This patch does two things: 1. Cleans up the request scheduling and queueing interface so that all fops only need to call iot_schedule and not iot_queue and in some cases iot_schedule. 2. Till now, we've had open and create calls go through the main glusterfsd thread when sending open and create fops. This patch makes them also go through the worker threads. But since the open and creates requests would not be called with a valid inode number in the loc_t, these requests will get assigned to the worker at index 0. This will be fixed RSN, when we introduce various techniques of distributing the inodes(..not requests..) over the worker threads. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* IO-threads Cleanup: Change workers list to dynamically allocated arrayShehjar Tikoo2009-03-172-28/+51
| | | | | | | | | | Worker threads were represented as a list in iot_conf_t which made us traverse the list of workers in order to decide which thread gets the request. Now we represent the workers as a dynamically allocated array so that we can just index into the array to schedule the file. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* IO-threads Cleanup: Change request queue into a struct list_headShehjar Tikoo2009-03-172-24/+20
| | | | | | | | This patch changes the per-thread request queue from a custom circular linked list, into the standard list.h list which is easier to understand and has a cleaner interface. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* updated copyright header to extend copyright upto 2009Basavanagowda Kanur2009-02-262-2/+2
| | | | | | updated copyright header to include 2009. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* RE-SEND: Add braces around critical sections.Shehjar Tikoo2009-02-231-16/+20
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* Reduce iothreads requests queue lock granularity.Shehjar Tikoo2009-02-192-34/+22
| | | | | | | | | | | iot_queue() and iot_dequeue() functions were using a io-threads translator-wide lock which would be contended for by every worker thread waiting for IO requests. This patch reduces the granularity by turning the lock into a per-worker lock. Signed-off-by: Anand V. Avati <avati@dev.gluster.com>