Lines Matching defs:mode

124 	.mode = MPOL_PREFERRED,
168 if (pol->mode)
223 * parameter with respect to the policy mode and flags. But, we need to
234 /* if mode is MPOL_DEFAULT, pol is NULL. This is right. */
242 if (pol->mode == MPOL_PREFERRED && nodes_empty(*nodes))
258 ret = mpol_ops[pol->mode].create(pol, &nsc->mask2);
260 ret = mpol_ops[pol->mode].create(pol, NULL);
268 static struct mempolicy *mpol_new(unsigned short mode, unsigned short flags,
273 pr_debug("setting mode %d flags %d nodes[0] %lx\n",
274 mode, flags, nodes ? nodes_addr(*nodes)[0] : NUMA_NO_NODE);
276 if (mode == MPOL_DEFAULT) {
288 if (mode == MPOL_PREFERRED) {
294 } else if (mode == MPOL_LOCAL) {
299 mode = MPOL_PREFERRED;
306 policy->mode = mode;
377 if (!pol || pol->mode == MPOL_LOCAL)
383 mpol_ops[pol->mode].rebind(pol, newmask);
858 static long do_set_mempolicy(unsigned short mode, unsigned short flags,
868 new = mpol_new(mode, flags, nodes);
882 if (new && new->mode == MPOL_INTERLEAVE)
903 switch (p->mode) {
995 pol->mode == MPOL_INTERLEAVE) {
1003 pol->mode;
1265 unsigned short mode, unsigned short mode_flags,
1283 if (mode == MPOL_DEFAULT)
1294 new = mpol_new(mode, mode_flags, nmask);
1308 pr_debug("mbind %lx-%lx mode:%d flags:%d nodes:%lx\n",
1309 start, start + len, mode, mode_flags,
1450 unsigned long mode, const unsigned long __user *nmask,
1458 mode_flags = mode & MPOL_MODE_FLAGS;
1459 mode &= ~MPOL_MODE_FLAGS;
1460 if (mode >= MPOL_MAX)
1468 return do_mbind(start, len, mode, mode_flags, &nodes, flags);
1472 unsigned long, mode, const unsigned long __user *, nmask,
1475 return kernel_mbind(start, len, mode, nmask, maxnode, flags);
1479 static long kernel_set_mempolicy(int mode, const unsigned long __user *nmask,
1486 flags = mode & MPOL_MODE_FLAGS;
1487 mode &= ~MPOL_MODE_FLAGS;
1488 if ((unsigned int)mode >= MPOL_MAX)
1495 return do_set_mempolicy(mode, flags, &nodes);
1498 SYSCALL_DEFINE3(set_mempolicy, int, mode, const unsigned long __user *, nmask,
1501 return kernel_set_mempolicy(mode, nmask, maxnode);
1669 COMPAT_SYSCALL_DEFINE3(set_mempolicy, int, mode, compat_ulong_t __user *, nmask,
1687 return kernel_set_mempolicy(mode, nm, nr_bits+1);
1691 compat_ulong_t, mode, compat_ulong_t __user *, nmask,
1709 return kernel_mbind(start, len, mode, nm, nr_bits+1, flags);
1872 if (unlikely(policy->mode == MPOL_BIND) &&
1883 if (policy->mode == MPOL_PREFERRED && !(policy->flags & MPOL_F_LOCAL))
1891 WARN_ON_ONCE(policy->mode == MPOL_BIND && (gfp & __GFP_THISNODE));
1925 switch (policy->mode) {
2022 if (unlikely((*mpol)->mode == MPOL_INTERLEAVE)) {
2027 if ((*mpol)->mode == MPOL_BIND)
2059 switch (mempolicy->mode) {
2105 switch (mempolicy->mode) {
2179 if (pol->mode == MPOL_INTERLEAVE) {
2201 if (pol->mode == MPOL_PREFERRED && !(pol->flags & MPOL_F_LOCAL))
2264 if (pol->mode == MPOL_INTERLEAVE)
2325 if (a->mode != b->mode)
2333 switch (a->mode) {
2414 new->policy ? new->policy->mode : 0);
2474 switch (pol->mode) {
2670 new = mpol_new(mpol->mode, mpol->flags, &mpol->w.user_nodemask);
2703 sz, npol ? npol->mode : -1,
2801 .mode = MPOL_PREFERRED,
2867 * <mode>[=<flags>][:<nodelist>]
2878 int err = 1, mode;
2881 *flags++ = '\0'; /* terminate mode string */
2884 /* NUL-terminate mode or flags string */
2893 mode = match_string(policy_modes, MPOL_MAX, str);
2894 if (mode < 0)
2897 switch (mode) {
2927 mode = MPOL_PREFERRED;
2948 * mode flags.
2958 new = mpol_new(mode, mode_flags, &nodes);
2966 if (mode != MPOL_PREFERRED)
3000 * Recommend a @maxlen of at least 32 for the longest mode, "interleave", the
3007 unsigned short mode = MPOL_DEFAULT;
3011 mode = pol->mode;
3015 switch (mode) {
3020 mode = MPOL_LOCAL;
3034 p += snprintf(p, maxlen, "%s", policy_modes[mode]);