Lines Matching full:swapped
428 * @swapped: the change in number of pages swapped from inode
433 * But normally info->alloced == inode->i_mapping->nrpages + info->swapped
434 * So mm freed is info->alloced - (inode->i_mapping->nrpages + info->swapped)
436 * Return: true if swapped was incremented from 0, for shmem_writeout().
438 static bool shmem_recalc_inode(struct inode *inode, long alloced, long swapped) in shmem_recalc_inode() argument
446 info->swapped += swapped; in shmem_recalc_inode()
447 freed = info->alloced - info->swapped - in shmem_recalc_inode()
452 * shmem_writeout() has to raise swapped before nrpages is lowered - in shmem_recalc_inode()
456 if (swapped > 0) { in shmem_recalc_inode()
457 if (info->swapped == swapped) in shmem_recalc_inode()
459 freed += swapped; in shmem_recalc_inode()
963 * given offsets are swapped out.
973 unsigned long swapped = 0; in shmem_partial_swap_usage() local
981 swapped += 1 << xas_get_order(&xas); in shmem_partial_swap_usage()
991 return swapped << PAGE_SHIFT; in shmem_partial_swap_usage()
996 * given vma is swapped out.
1006 unsigned long swapped; in shmem_swap_usage() local
1009 swapped = READ_ONCE(info->swapped); in shmem_swap_usage()
1016 if (!swapped) in shmem_swap_usage()
1020 return swapped << PAGE_SHIFT; in shmem_swap_usage()
1062 /* The folio has been swapped out */ in shmem_get_partial_folio()
1245 if (info->alloced - info->swapped != inode->i_mapping->nrpages) in shmem_getattr()
1430 * Move the swapped pages for an inode to page cache. Returns the count
1431 * of pages swapped in, or the error in case of failure.
1503 if (!info->swapped) { in shmem_unuse()
1527 if (!info->swapped) in shmem_unuse()
1625 * Add inode to shmem_unuse()'s list of swapped-out inodes, in shmem_writeout()
1629 * we've incremented swapped, because shmem_unuse() will in shmem_writeout()
1630 * prune a !swapped inode from the swaplist. in shmem_writeout()
1954 freed = pages + info->alloced - info->swapped - in shmem_alloc_and_add_folio()
2245 * Caller has to make sure that *foliop contains a valid swapped folio.
2478 /* Has the folio been truncated or swapped out? */ in shmem_get_folio_gfp()