aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/cpuset.c
diff options
context:
space:
mode:
authorRandy Dunlap <rdunlap@xenotime.net>2005-07-27 14:45:11 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-07-27 19:26:06 -0400
commitd9fd8a6d443b509147280f058d4e59f0b796a323 (patch)
tree427385e403fc0d4282be19732a00ddfd224c1461 /kernel/cpuset.c
parent207a7ba8dc000e1b13acac97f3736810dd86e8e2 (diff)
[PATCH] kernel/cpuset.c: add kerneldoc, fix typos
Add kerneldoc to kernel/cpuset.c Fix cpuset typos in init/Kconfig Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Acked-by: Paul Jackson <pj@sgi.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel/cpuset.c')
-rw-r--r--kernel/cpuset.c26
1 files changed, 19 insertions, 7 deletions
diff --git a/kernel/cpuset.c b/kernel/cpuset.c
index 984c0bf3807f..805fb9097318 100644
--- a/kernel/cpuset.c
+++ b/kernel/cpuset.c
@@ -1440,10 +1440,10 @@ void __init cpuset_init_smp(void)
1440 1440
1441/** 1441/**
1442 * cpuset_fork - attach newly forked task to its parents cpuset. 1442 * cpuset_fork - attach newly forked task to its parents cpuset.
1443 * @p: pointer to task_struct of forking parent process. 1443 * @tsk: pointer to task_struct of forking parent process.
1444 * 1444 *
1445 * Description: By default, on fork, a task inherits its 1445 * Description: By default, on fork, a task inherits its
1446 * parents cpuset. The pointer to the shared cpuset is 1446 * parent's cpuset. The pointer to the shared cpuset is
1447 * automatically copied in fork.c by dup_task_struct(). 1447 * automatically copied in fork.c by dup_task_struct().
1448 * This cpuset_fork() routine need only increment the usage 1448 * This cpuset_fork() routine need only increment the usage
1449 * counter in that cpuset. 1449 * counter in that cpuset.
@@ -1471,7 +1471,6 @@ void cpuset_fork(struct task_struct *tsk)
1471 * by the cpuset_sem semaphore. If you don't hold cpuset_sem, 1471 * by the cpuset_sem semaphore. If you don't hold cpuset_sem,
1472 * then a zero cpuset use count is a license to any other task to 1472 * then a zero cpuset use count is a license to any other task to
1473 * nuke the cpuset immediately. 1473 * nuke the cpuset immediately.
1474 *
1475 **/ 1474 **/
1476 1475
1477void cpuset_exit(struct task_struct *tsk) 1476void cpuset_exit(struct task_struct *tsk)
@@ -1521,7 +1520,9 @@ void cpuset_init_current_mems_allowed(void)
1521 current->mems_allowed = NODE_MASK_ALL; 1520 current->mems_allowed = NODE_MASK_ALL;
1522} 1521}
1523 1522
1524/* 1523/**
1524 * cpuset_update_current_mems_allowed - update mems parameters to new values
1525 *
1525 * If the current tasks cpusets mems_allowed changed behind our backs, 1526 * If the current tasks cpusets mems_allowed changed behind our backs,
1526 * update current->mems_allowed and mems_generation to the new value. 1527 * update current->mems_allowed and mems_generation to the new value.
1527 * Do not call this routine if in_interrupt(). 1528 * Do not call this routine if in_interrupt().
@@ -1540,13 +1541,20 @@ void cpuset_update_current_mems_allowed(void)
1540 } 1541 }
1541} 1542}
1542 1543
1544/**
1545 * cpuset_restrict_to_mems_allowed - limit nodes to current mems_allowed
1546 * @nodes: pointer to a node bitmap that is and-ed with mems_allowed
1547 */
1543void cpuset_restrict_to_mems_allowed(unsigned long *nodes) 1548void cpuset_restrict_to_mems_allowed(unsigned long *nodes)
1544{ 1549{
1545 bitmap_and(nodes, nodes, nodes_addr(current->mems_allowed), 1550 bitmap_and(nodes, nodes, nodes_addr(current->mems_allowed),
1546 MAX_NUMNODES); 1551 MAX_NUMNODES);
1547} 1552}
1548 1553
1549/* 1554/**
1555 * cpuset_zonelist_valid_mems_allowed - check zonelist vs. curremt mems_allowed
1556 * @zl: the zonelist to be checked
1557 *
1550 * Are any of the nodes on zonelist zl allowed in current->mems_allowed? 1558 * Are any of the nodes on zonelist zl allowed in current->mems_allowed?
1551 */ 1559 */
1552int cpuset_zonelist_valid_mems_allowed(struct zonelist *zl) 1560int cpuset_zonelist_valid_mems_allowed(struct zonelist *zl)
@@ -1562,8 +1570,12 @@ int cpuset_zonelist_valid_mems_allowed(struct zonelist *zl)
1562 return 0; 1570 return 0;
1563} 1571}
1564 1572
1565/* 1573/**
1566 * Is 'current' valid, and is zone z allowed in current->mems_allowed? 1574 * cpuset_zone_allowed - is zone z allowed in current->mems_allowed
1575 * @z: zone in question
1576 *
1577 * Is zone z allowed in current->mems_allowed, or is
1578 * the CPU in interrupt context? (zone is always allowed in this case)
1567 */ 1579 */
1568int cpuset_zone_allowed(struct zone *z) 1580int cpuset_zone_allowed(struct zone *z)
1569{ 1581{