Print this page
11909 THREAD_KPRI_RELEASE does nothing of the sort
Reviewed by: Bryan Cantrill <bryan@joyent.com>
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
*** 19,28 ****
--- 19,29 ----
* CDDL HEADER END
*/
/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
+ * Copyright 2019 Joyent, Inc.
*/
/* Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
*** 219,262 ****
/*
* Wait for all of the direct IO operations to finish
*/
- uint32_t ufs_directio_drop_kpri = 0; /* enable kpri hack */
-
static int
directio_wait(struct directio_buf *tail, long *bytes_iop)
{
int error = 0, newerror;
struct directio_buf *dbp;
- uint_t kpri_req_save;
/*
* The linked list of directio buf structures is maintained
* in reverse order (tail->last request->penultimate request->...)
*/
- /*
- * This is the k_pri_req hack. Large numbers of threads
- * sleeping with kernel priority will cause scheduler thrashing
- * on an MP machine. This can be seen running Oracle using
- * directio to ufs files. Sleep at normal priority here to
- * more closely mimic physio to a device partition. This
- * workaround is disabled by default as a niced thread could
- * be starved from running while holding i_rwlock and i_contents.
- */
- if (ufs_directio_drop_kpri) {
- kpri_req_save = curthread->t_kpri_req;
- curthread->t_kpri_req = 0;
- }
while ((dbp = tail) != NULL) {
tail = dbp->next;
newerror = directio_wait_one(dbp, bytes_iop);
if (error == 0)
error = newerror;
}
- if (ufs_directio_drop_kpri)
- curthread->t_kpri_req = kpri_req_save;
return (error);
}
/*
* Initiate direct IO request
*/
--- 220,245 ----