Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
LU-16202 build: bio_alloc takes struct block_device
[fs/lustre-release.git]
/
libcfs
/
libcfs
/
workitem.c
diff --git
a/libcfs/libcfs/workitem.c
b/libcfs/libcfs/workitem.c
index
168fea5
..
d2b9eb4
100644
(file)
--- a/
libcfs/libcfs/workitem.c
+++ b/
libcfs/libcfs/workitem.c
@@
-15,11
+15,7
@@
*
* You should have received a copy of the GNU General Public License
* version 2 along with this program; If not, see
*
* You should have received a copy of the GNU General Public License
* version 2 along with this program; If not, see
- * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf
- *
- * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
+ * http://www.gnu.org/licenses/gpl-2.0.html
*
* GPL HEADER END
*/
*
* GPL HEADER END
*/
@@
-27,11
+23,10
@@
* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*
* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*
- * Copyright (c) 2011, 201
4
, Intel Corporation.
+ * Copyright (c) 2011, 201
3
, Intel Corporation.
*/
/*
* This file is part of Lustre, http://www.lustre.org/
*/
/*
* This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
*
* libcfs/libcfs/workitem.c
*
*
* libcfs/libcfs/workitem.c
*
@@
-130,8
+125,6
@@
cfs_wi_exit(struct cfs_wi_sched *sched, struct cfs_workitem *wi)
wi->wi_scheduled = 1; /* LBUG future schedule attempts */
spin_unlock(&sched->ws_lock);
wi->wi_scheduled = 1; /* LBUG future schedule attempts */
spin_unlock(&sched->ws_lock);
-
- return;
}
EXPORT_SYMBOL(cfs_wi_exit);
}
EXPORT_SYMBOL(cfs_wi_exit);
@@
-202,7
+195,6
@@
cfs_wi_schedule(struct cfs_wi_sched *sched, struct cfs_workitem *wi)
LASSERT (!list_empty(&wi->wi_list));
spin_unlock(&sched->ws_lock);
LASSERT (!list_empty(&wi->wi_list));
spin_unlock(&sched->ws_lock);
- return;
}
EXPORT_SYMBOL(cfs_wi_schedule);
}
EXPORT_SYMBOL(cfs_wi_schedule);
@@
-211,12
+203,10
@@
cfs_wi_scheduler(void *arg)
{
struct cfs_wi_sched *sched = (struct cfs_wi_sched *)arg;
{
struct cfs_wi_sched *sched = (struct cfs_wi_sched *)arg;
- cfs_block_allsigs();
-
/* CPT affinity scheduler? */
if (sched->ws_cptab != NULL)
if (cfs_cpt_bind(sched->ws_cptab, sched->ws_cpt) != 0)
/* CPT affinity scheduler? */
if (sched->ws_cptab != NULL)
if (cfs_cpt_bind(sched->ws_cptab, sched->ws_cpt) != 0)
- CWARN("
Failed to bind %s on CPT
%d\n",
+ CWARN("
Unable to bind %s on CPU partition
%d\n",
sched->ws_name, sched->ws_cpt);
spin_lock(&cfs_wi_data.wi_glock);
sched->ws_name, sched->ws_cpt);
spin_lock(&cfs_wi_data.wi_glock);
@@
-317,14
+307,13
@@
cfs_wi_sched_destroy(struct cfs_wi_sched *sched)
int i = 2;
while (sched->ws_nthreads > 0) {
int i = 2;
while (sched->ws_nthreads > 0) {
- CDEBUG(IS_PO2(++i) ? D_WARNING : D_NET,
- "waiting for %d threads of WI sched[%s] to "
- "terminate\n", sched->ws_nthreads,
- sched->ws_name);
+ CDEBUG(is_power_of_2(++i / 20) ? D_WARNING : D_NET,
+ "waiting %us for %d %s worker threads to exit\n",
+ i / 20, sched->ws_nthreads, sched->ws_name);
spin_unlock(&cfs_wi_data.wi_glock);
spin_unlock(&cfs_wi_data.wi_glock);
- s
et_current_state(TASK_UNINTERRUPTIBLE);
-
schedule_timeout(cfs_time_seconds(1)
/ 20);
+ s
chedule_timeout_uninterruptible(cfs_time_seconds(1)
+
/ 20);
spin_lock(&cfs_wi_data.wi_glock);
}
}
spin_lock(&cfs_wi_data.wi_glock);
}
}
@@
-393,7
+382,7
@@
cfs_wi_sched_create(char *name, struct cfs_cpt_table *cptab,
sched->ws_name, sched->ws_nthreads);
}
sched->ws_name, sched->ws_nthreads);
}
- task = kthread_run(cfs_wi_scheduler, sched, name);
+ task = kthread_run(cfs_wi_scheduler, sched,
"%s",
name);
if (IS_ERR(task)) {
int rc = PTR_ERR(task);
if (IS_ERR(task)) {
int rc = PTR_ERR(task);
@@
-454,8
+443,8
@@
cfs_wi_shutdown (void)
while (sched->ws_nthreads != 0) {
spin_unlock(&cfs_wi_data.wi_glock);
while (sched->ws_nthreads != 0) {
spin_unlock(&cfs_wi_data.wi_glock);
- s
et_current_state(TASK_UNINTERRUPTIBLE);
-
schedule_timeout(cfs_time_seconds(1)
/ 20);
+ s
chedule_timeout_uninterruptible(cfs_time_seconds(1)
+
/ 20);
spin_lock(&cfs_wi_data.wi_glock);
}
spin_unlock(&cfs_wi_data.wi_glock);
spin_lock(&cfs_wi_data.wi_glock);
}
spin_unlock(&cfs_wi_data.wi_glock);