Home
last modified time | relevance | path

Searched refs:offset (Results 1 – 25 of 30) sorted by relevance

12

/mm/
Dreadahead.c153 pgoff_t offset, unsigned long nr_to_read, in __do_page_cache_readahead() argument
173 pgoff_t page_offset = offset + page_idx; in __do_page_cache_readahead()
211 pgoff_t offset, unsigned long nr_to_read) in force_page_cache_readahead() argument
225 offset, this_chunk, 0); in force_page_cache_readahead()
229 offset += this_chunk; in force_page_cache_readahead()
329 pgoff_t offset, unsigned long max) in count_history_pages() argument
334 head = page_cache_prev_hole(mapping, offset - 1, max); in count_history_pages()
337 return offset - 1 - head; in count_history_pages()
345 pgoff_t offset, in try_context_readahead() argument
351 size = count_history_pages(mapping, offset, max); in try_context_readahead()
[all …]
Dswapfile.c96 __try_to_reclaim_swap(struct swap_info_struct *si, unsigned long offset) in __try_to_reclaim_swap() argument
98 swp_entry_t entry = swp_entry(si->type, offset); in __try_to_reclaim_swap()
172 pgoff_t offset = start_page - se->start_page; in discard_swap_cluster() local
173 sector_t start_block = se->start_block + offset; in discard_swap_cluster()
174 sector_t nr_blocks = se->nr_pages - offset; in discard_swap_cluster()
415 unsigned long offset) in scan_swap_map_ssd_cluster_conflict() argument
420 offset /= SWAPFILE_CLUSTER; in scan_swap_map_ssd_cluster_conflict()
422 offset != cluster_next(&si->free_cluster_head) && in scan_swap_map_ssd_cluster_conflict()
423 cluster_is_free(&si->cluster_info[offset]); in scan_swap_map_ssd_cluster_conflict()
438 unsigned long *offset, unsigned long *scan_base) in scan_swap_map_try_ssd_cluster() argument
[all …]
Ddmapool.c61 unsigned int offset; member
208 unsigned int offset = 0; in pool_initialise_page() local
212 unsigned int next = offset + pool->size; in pool_initialise_page()
217 *(int *)(page->vaddr + offset) = next; in pool_initialise_page()
218 offset = next; in pool_initialise_page()
219 } while (offset < pool->allocation); in pool_initialise_page()
237 page->offset = 0; in pool_alloc_page()
323 size_t offset; in dma_pool_alloc() local
330 if (page->offset < pool->allocation) in dma_pool_alloc()
346 offset = page->offset; in dma_pool_alloc()
[all …]
Dfrontswap.c192 pgoff_t offset) in __frontswap_test() argument
197 ret = test_bit(offset, sis->frontswap_map); in __frontswap_test()
203 pgoff_t offset) in __frontswap_clear() argument
205 clear_bit(offset, sis->frontswap_map); in __frontswap_clear()
222 pgoff_t offset = swp_offset(entry); in __frontswap_store() local
233 if (__frontswap_test(sis, offset)) in __frontswap_store()
235 ret = frontswap_ops->store(type, offset, page); in __frontswap_store()
237 set_bit(offset, sis->frontswap_map); in __frontswap_store()
248 __frontswap_clear(sis, offset); in __frontswap_store()
249 frontswap_ops->invalidate_page(type, offset); in __frontswap_store()
[all …]
Diov_iter.c97 static size_t copy_page_to_iter_iovec(struct page *page, size_t offset, size_t bytes, in copy_page_to_iter_iovec() argument
119 from = kaddr + offset; in copy_page_to_iter_iovec()
142 offset = from - kaddr; in copy_page_to_iter_iovec()
149 from = kaddr + offset; in copy_page_to_iter_iovec()
178 static size_t copy_page_from_iter_iovec(struct page *page, size_t offset, size_t bytes, in copy_page_from_iter_iovec() argument
200 to = kaddr + offset; in copy_page_from_iter_iovec()
223 offset = to - kaddr; in copy_page_from_iter_iovec()
230 to = kaddr + offset; in copy_page_from_iter_iovec()
331 struct iov_iter *i, unsigned long offset, size_t bytes) in copy_from_user_atomic_iovec() argument
340 left = __copy_from_user_inatomic(kaddr + offset, buf, bytes); in copy_from_user_atomic_iovec()
[all …]
Dzswap.c182 pgoff_t offset; member
239 static struct zswap_entry *zswap_rb_search(struct rb_root *root, pgoff_t offset) in zswap_rb_search() argument
246 if (entry->offset > offset) in zswap_rb_search()
248 else if (entry->offset < offset) in zswap_rb_search()
269 if (myentry->offset > entry->offset) in zswap_rb_insert()
271 else if (myentry->offset < entry->offset) in zswap_rb_insert()
326 pgoff_t offset) in zswap_entry_find_get() argument
330 entry = zswap_rb_search(root, offset); in zswap_entry_find_get()
538 pgoff_t offset; in zswap_writeback_entry() local
553 offset = swp_offset(swpentry); in zswap_writeback_entry()
[all …]
Dfilemap.c117 unsigned int offset; in page_cache_tree_delete() local
146 offset = index & RADIX_TREE_MAP_MASK; in page_cache_tree_delete()
148 if (test_bit(offset, node->tags[tag])) in page_cache_tree_delete()
476 pgoff_t offset = old->index; in replace_page_cache_page() local
481 new->index = offset; in replace_page_cache_page()
485 error = radix_tree_insert(&mapping->page_tree, offset, new); in replace_page_cache_page()
547 pgoff_t offset, gfp_t gfp_mask, in __add_to_page_cache_locked() argument
573 page->index = offset; in __add_to_page_cache_locked()
607 pgoff_t offset, gfp_t gfp_mask) in add_to_page_cache_locked() argument
609 return __add_to_page_cache_locked(page, mapping, offset, in add_to_page_cache_locked()
[all …]
Dswap_state.c394 static unsigned long swapin_nr_pages(unsigned long offset) in swapin_nr_pages() argument
416 if (offset != prev_offset + 1 && offset != prev_offset - 1) in swapin_nr_pages()
418 prev_offset = offset; in swapin_nr_pages()
462 unsigned long offset = entry_offset; in swapin_readahead() local
467 mask = swapin_nr_pages(offset) - 1; in swapin_readahead()
472 start_offset = offset & ~mask; in swapin_readahead()
473 end_offset = offset | mask; in swapin_readahead()
478 for (offset = start_offset; offset <= end_offset ; offset++) { in swapin_readahead()
480 page = read_swap_cache_async(swp_entry(swp_type(entry), offset), in swapin_readahead()
484 if (offset != entry_offset) in swapin_readahead()
Dfilemap_xip.c61 unsigned long offset; in do_xip_mapping_read() local
69 offset = pos & ~PAGE_CACHE_MASK; in do_xip_mapping_read()
88 if (nr <= offset) { in do_xip_mapping_read()
92 nr = nr - offset; in do_xip_mapping_read()
123 left = __copy_to_user(buf+copied, xip_mem+offset, nr); in do_xip_mapping_read()
133 offset += (nr - left); in do_xip_mapping_read()
134 index += offset >> PAGE_CACHE_SHIFT; in do_xip_mapping_read()
135 offset &= ~PAGE_CACHE_MASK; in do_xip_mapping_read()
338 unsigned long offset; in __xip_file_write() local
343 offset = (pos & (PAGE_CACHE_SIZE -1)); /* Within page */ in __xip_file_write()
[all …]
Dfadvise.c28 SYSCALL_DEFINE4(fadvise64_64, int, fd, loff_t, offset, loff_t, len, int, advice) in SYSCALL_DEFINE4() argument
70 endbyte = offset + len; in SYSCALL_DEFINE4()
98 start_index = offset >> PAGE_CACHE_SHIFT; in SYSCALL_DEFINE4()
117 __filemap_fdatawrite_range(mapping, offset, endbyte, in SYSCALL_DEFINE4()
121 start_index = (offset+(PAGE_CACHE_SIZE-1)) >> PAGE_CACHE_SHIFT; in SYSCALL_DEFINE4()
151 SYSCALL_DEFINE4(fadvise64, int, fd, loff_t, offset, size_t, len, int, advice) in SYSCALL_DEFINE4() argument
153 return sys_fadvise64_64(fd, offset, len, advice); in SYSCALL_DEFINE4()
Dinternal.h26 struct file *filp, pgoff_t offset, unsigned long nr_to_read,
287 static inline struct page *mem_map_offset(struct page *base, int offset) in mem_map_offset() argument
289 if (unlikely(offset >= MAX_ORDER_NR_PAGES)) in mem_map_offset()
290 return nth_page(base, offset); in mem_map_offset()
291 return base + offset; in mem_map_offset()
299 struct page *base, int offset) in mem_map_next() argument
301 if (unlikely((offset & (MAX_ORDER_NR_PAGES - 1)) == 0)) { in mem_map_next()
302 unsigned long pfn = page_to_pfn(base) + offset; in mem_map_next()
Dearly_ioremap.c99 unsigned long offset; in __early_ioremap() local
128 offset = phys_addr & ~PAGE_MASK; in __early_ioremap()
153 __func__, (u64)phys_addr, size, slot, offset, slot_virt[slot]); in __early_ioremap()
155 prev_map[slot] = (void __iomem *)(offset + slot_virt[slot]); in __early_ioremap()
162 unsigned long offset; in early_iounmap() local
191 offset = virt_addr & ~PAGE_MASK; in early_iounmap()
192 nrpages = PAGE_ALIGN(offset + size) >> PAGE_SHIFT; in early_iounmap()
Dshmem.c1528 unsigned long offset; in shmem_file_read_iter() local
1543 offset = *ppos & ~PAGE_CACHE_MASK; in shmem_file_read_iter()
1556 if (nr <= offset) in shmem_file_read_iter()
1578 if (nr <= offset) { in shmem_file_read_iter()
1584 nr -= offset; in shmem_file_read_iter()
1597 if (!offset) in shmem_file_read_iter()
1608 ret = copy_page_to_iter(page, offset, nr, to); in shmem_file_read_iter()
1610 offset += ret; in shmem_file_read_iter()
1611 index += offset >> PAGE_CACHE_SHIFT; in shmem_file_read_iter()
1612 offset &= ~PAGE_CACHE_MASK; in shmem_file_read_iter()
[all …]
Dpage_cgroup.c27 unsigned long offset; in lookup_page_cgroup() local
41 offset = pfn - NODE_DATA(page_to_nid(page))->node_start_pfn; in lookup_page_cgroup()
42 return base + offset; in lookup_page_cgroup()
387 pgoff_t offset = swp_offset(ent); in lookup_swap_cgroup() local
396 mappage = ctrl->map[offset / SC_PER_PAGE]; in lookup_swap_cgroup()
398 return sc + offset % SC_PER_PAGE; in lookup_swap_cgroup()
Dutil.c276 unsigned long flag, unsigned long offset) in vm_mmap() argument
278 if (unlikely(offset + PAGE_ALIGN(len) < offset)) in vm_mmap()
280 if (unlikely(offset & ~PAGE_MASK)) in vm_mmap()
283 return vm_mmap_pgoff(file, addr, len, prot, flag, offset >> PAGE_SHIFT); in vm_mmap()
Dprocess_vm_access.c34 unsigned offset, in process_vm_rw_pages() argument
42 size_t copy = PAGE_SIZE - offset; in process_vm_rw_pages()
49 copied = copy_page_from_iter(page, offset, copy, iter); in process_vm_rw_pages()
52 copied = copy_page_to_iter(page, offset, copy, iter); in process_vm_rw_pages()
57 offset = 0; in process_vm_rw_pages()
Dcma.c365 unsigned long mask, offset, pfn, start = 0; in cma_alloc() local
380 offset = cma_bitmap_aligned_offset(cma, align); in cma_alloc()
388 offset); in cma_alloc()
Dpage_io.c119 unsigned long offset; in end_swap_bio_read() local
122 offset = swp_offset(entry); in end_swap_bio_read()
126 offset); in end_swap_bio_read()
Dslab.c455 u32 offset = (obj - page->s_mem); in obj_to_index() local
456 return reciprocal_divide(offset, cache->reciprocal_buffer_size); in obj_to_index()
1701 static void dump_line(char *data, int offset, int limit) in dump_line() argument
1707 printk(KERN_ERR "%03x: ", offset); in dump_line()
1709 if (data[offset + i] != POISON_FREE) { in dump_line()
1710 error = data[offset + i]; in dump_line()
1715 &data[offset], limit, 1); in dump_line()
2592 size_t offset; in cache_grow() local
2609 offset = n->colour_next; in cache_grow()
2615 offset *= cachep->colour_off; in cache_grow()
[all …]
Dvmalloc.c965 unsigned long offset; in vb_free() local
977 offset = (unsigned long)addr & (VMAP_BLOCK_SIZE - 1); in vb_free()
988 BUG_ON(bitmap_allocate_region(vb->dirty_map, offset >> PAGE_SHIFT, order)); in vb_free()
1882 unsigned long offset, length; in aligned_vread() local
1884 offset = (unsigned long)addr & ~PAGE_MASK; in aligned_vread()
1885 length = PAGE_SIZE - offset; in aligned_vread()
1902 memcpy(buf, map + offset, length); in aligned_vread()
1921 unsigned long offset, length; in aligned_vwrite() local
1923 offset = (unsigned long)addr & ~PAGE_MASK; in aligned_vwrite()
1924 length = PAGE_SIZE - offset; in aligned_vwrite()
[all …]
Dslub.c236 return *(void **)(object + s->offset); in get_freepointer()
241 prefetch(object + s->offset); in prefetch_freepointer()
249 probe_kernel_read(&p, (void **)(object + s->offset), sizeof(p)); in get_freepointer_safe()
258 *(void **)(object + s->offset) = fp; in set_freepointer()
512 if (s->offset) in get_track()
513 p = object + s->offset + sizeof(void *); in get_track()
647 if (s->offset) in print_trailer()
648 off = s->offset + sizeof(void *); in print_trailer()
772 if (s->offset) in check_pad_bytes()
854 if (!s->offset && val == SLUB_RED_ACTIVE) in check_object()
[all …]
Dmadvise.c300 loff_t offset; in madvise_remove() local
318 offset = (loff_t)(start - vma->vm_start) in madvise_remove()
331 offset, end - start); in madvise_remove()
Dslob.c148 slobidx_t offset = next - base; in set_slob() local
152 s[1].units = offset; in set_slob()
154 s[0].units = -offset; in set_slob()
Dzsmalloc.c1574 int offset = 0; in find_alloced_obj() local
1579 offset = page->index; in find_alloced_obj()
1580 offset += class->size * index; in find_alloced_obj()
1582 while (offset < PAGE_SIZE) { in find_alloced_obj()
1583 head = obj_to_head(class, page, addr + offset); in find_alloced_obj()
1591 offset += class->size; in find_alloced_obj()
Dmemory.c3519 int offset = addr & (PAGE_SIZE-1); in generic_access_phys() local
3524 maddr = ioremap_prot(phys_addr, PAGE_ALIGN(len + offset), prot); in generic_access_phys()
3526 memcpy_toio(maddr + offset, buf, len); in generic_access_phys()
3528 memcpy_fromio(buf, maddr + offset, len); in generic_access_phys()
3549 int bytes, ret, offset; in __access_remote_vm() local
3575 offset = addr & (PAGE_SIZE-1); in __access_remote_vm()
3576 if (bytes > PAGE_SIZE-offset) in __access_remote_vm()
3577 bytes = PAGE_SIZE-offset; in __access_remote_vm()
3582 maddr + offset, buf, bytes); in __access_remote_vm()
3586 buf, maddr + offset, bytes); in __access_remote_vm()

12