Home | History | Annotate | Download | only in common

Lines Matching defs:thread

108 	    "single nfsd thread should be working on at any time");
255 fha_hash_entry_add_thread(struct fha_hash_entry *fhe, SVCTHREAD *thread)
259 thread->st_p2 = 0;
260 LIST_INSERT_HEAD(&fhe->threads, thread, st_alink);
265 fha_hash_entry_remove_thread(struct fha_hash_entry *fhe, SVCTHREAD *thread)
269 KASSERT(thread->st_p2 == 0,
270 ("%d reqs on removed thread %p", thread->st_p2, thread));
271 LIST_REMOVE(thread, st_alink);
290 * Get the service thread currently associated with the fhe that is
297 SVCTHREAD *thread, *min_thread = NULL;
304 LIST_FOREACH(thread, &fhe->threads, st_alink) {
305 req_count = thread->st_p2;
307 /* If there are any writes in progress, use the first thread. */
311 "fha: %p(%d)w", thread, req_count);
313 return (thread);
318 * exceed our per-thread load limit in the process.
321 offset2 = thread->st_p3;
331 "fha: %p(%d)r", thread, req_count);
333 return (thread);
338 * We don't have a locality match, so skip this thread,
339 * but keep track of the most attractive thread in case
344 "fha: %p(%d)s off1 %llu off2 %llu", thread,
349 min_thread = thread;
355 * a new thread to this file handle entry's thread list.
359 thread = this_thread;
362 "fha: %p(%d)t", thread, thread->st_p2);
364 fha_hash_entry_add_thread(fhe, thread);
370 thread = min_thread;
373 return (thread);
377 * After getting a request, try to assign it to some thread. Usually we
384 SVCTHREAD *thread;
416 * Choose a thread, taking into consideration locality, thread load,
419 thread = fha_hash_entry_choose_thread(softc, fhe, &i, this_thread);
420 KASSERT(thread, ("fha_assign: NULL thread!"));
422 thread->st_p2++;
423 thread->st_p3 = i.offset;
426 * Grab the pool lock here to not let chosen thread go away before
429 mtx_lock(&thread->st_lock);
432 return (thread);
444 fha_nd_complete(SVCTHREAD *thread, struct svc_req *req)
459 thread->st_p2--;
460 KASSERT(thread->st_p2 >= 0, ("Negative request count %d on %p",
461 thread->st_p2, thread));
462 if (thread->st_p2 == 0) {
463 fha_hash_entry_remove_thread(fhe, thread);
477 SVCTHREAD *thread;
516 LIST_FOREACH(thread, &fhe->threads, st_alink) {
517 sbuf_printf(&sb, " thread %p offset %ju "
518 "reqs %d\n", thread,
519 thread->st_p3, thread->st_p2);