Searched refs:npages (Results 1 - 25 of 85) sorted by relevance

1234

/freebsd-10.0-release/lib/libgeom/
H A Dgeom_stats.c47 static uint npages, pagesize, spp; variable
56 munmap(statp, npages *pagesize);
70 p = mmap(statp, (npages + 1) * pagesize,
76 npages++;
102 npages = 1;
126 sp->ptr = malloc(pagesize * npages);
131 memset(sp->ptr, 0, pagesize * npages); /* page in, cache */
133 memset(sp->ptr, 0, pagesize * npages); /* page in, cache */
134 memcpy(sp->ptr, statp, pagesize * npages);
135 sp->pages = npages;
[all...]
/freebsd-10.0-release/contrib/ofed/libmthca/src/
H A Dmemfree.c52 int npages; member in struct:mthca_db_table
81 start = db_tab->npages - 1;
173 int npages; local
176 npages = uarc_size / MTHCA_DB_REC_PAGE_SIZE;
178 npages * sizeof (struct mthca_db_page));
182 db_tab->npages = npages;
184 db_tab->min_group2 = npages - 1;
186 for (i = 0; i < npages; ++i)
199 for (i = 0; i < db_tab->npages;
[all...]
/freebsd-10.0-release/sys/dev/drm2/ttm/
H A Dttm_page_alloc.c67 * @npages: Number of pages in pool.
75 unsigned npages; member in struct:ttm_page_pool
288 static void ttm_pages_put(vm_page_t *pages, unsigned npages) argument
293 if (set_pages_array_wb(pages, npages))
294 printf("[TTM] Failed to set %d pages to wb!\n", npages);
295 for (i = 0; i < npages; ++i)
302 pool->npages -= freed_pages;
398 total += _manager->pools[i].npages;
588 && count > pool->npages) {
606 pool->npages
658 ttm_put_pages(vm_page_t *pages, unsigned npages, int flags, enum ttm_caching_state cstate) argument
701 ttm_get_pages(vm_page_t *pages, unsigned npages, int flags, enum ttm_caching_state cstate) argument
[all...]
/freebsd-10.0-release/sys/dev/cxgb/ulp/iw_cxgb/
H A Diw_cxgb_mem.c118 int npages)
124 if (npages > mhp->attr.pbl_size)
145 int iwch_alloc_pbl(struct iwch_mr *mhp, int npages) argument
148 npages << 3);
153 mhp->attr.pbl_size = npages;
164 int iwch_write_pbl(struct iwch_mr *mhp, __be64 *pages, int npages, int offset) argument
167 mhp->attr.pbl_addr + (offset << 3), npages);
174 int *npages,
212 *npages = 0;
214 *npages
115 iwch_reregister_mem(struct iwch_dev *rhp, struct iwch_pd *php, struct iwch_mr *mhp, int shift, int npages) argument
170 build_phys_page_list(struct ib_phys_buf *buffer_list, int num_phys_buf, u64 *iova_start, u64 *total_size, int *npages, int *shift, __be64 **page_list) argument
[all...]
/freebsd-10.0-release/sys/vm/
H A Dvm_reserv.h49 u_long npages, vm_paddr_t low, vm_paddr_t high,
58 boolean_t vm_reserv_reclaim_contig(u_long npages, vm_paddr_t low,
H A Dsg_pager.c72 vm_pindex_t npages, pindex; local
85 npages = 0;
91 npages += sg->sg_segs[i].ss_len / PAGE_SIZE;
100 if (pindex > npages)
111 object = vm_object_allocate(OBJT_SG, npages);
H A Dvm_phys.h72 vm_page_t vm_phys_alloc_contig(u_long npages, vm_paddr_t low, vm_paddr_t high,
81 void vm_phys_free_contig(vm_page_t m, u_long npages);
H A Dvm_reserv.c293 * Allocates a contiguous set of physical pages of the given size "npages"
305 vm_reserv_alloc_contig(vm_object_t object, vm_pindex_t pindex, u_long npages, argument
317 KASSERT(npages != 0, ("vm_reserv_alloc_contig: npages is 0"));
323 pindex + npages > object->size)
339 size = npages << PAGE_SHIFT;
378 minpages = VM_RESERV_INDEX(object, pindex) + npages;
440 n = ulmin(VM_LEVEL_0_NPAGES - index, npages);
443 npages -= n;
460 if (index + npages > VM_LEVEL_0_NPAGE
804 vm_reserv_reclaim_contig(u_long npages, vm_paddr_t low, vm_paddr_t high, u_long alignment, vm_paddr_t boundary) argument
[all...]
/freebsd-10.0-release/sys/ofed/drivers/net/mlx4/
H A Dicm.c59 pci_unmap_sg(dev->pdev, chunk->mem, chunk->npages,
62 for (i = 0; i < chunk->npages; ++i)
71 for (i = 0; i < chunk->npages; ++i)
126 struct mlx4_icm *mlx4_alloc_icm(struct mlx4_dev *dev, int npages, argument
150 while (npages > 0) {
163 chunk->npages = 0;
168 while (1 << cur_order > npages)
173 &chunk->mem[chunk->npages],
176 ret = mlx4_alloc_icm_pages(&chunk->mem[chunk->npages],
187 ++chunk->npages;
[all...]
H A Dmr.c210 int mlx4_mtt_init(struct mlx4_dev *dev, int npages, int page_shift, argument
215 if (!npages) {
222 for (mtt->order = 0, i = 1; i < npages; i <<= 1)
228 npages, mtt->order);
312 u64 iova, u64 size, u32 access, int npages,
322 return mlx4_mtt_init(dev, npages, page_shift, &mr->mtt);
422 int npages, int page_shift, struct mlx4_mr *mr)
432 access, npages, page_shift, mr);
534 int start_index, int npages, u64 *page_list)
548 npages * sizeo
311 mlx4_mr_alloc_reserved(struct mlx4_dev *dev, u32 mridx, u32 pd, u64 iova, u64 size, u32 access, int npages, int page_shift, struct mlx4_mr *mr) argument
421 mlx4_mr_alloc(struct mlx4_dev *dev, u32 pd, u64 iova, u64 size, u32 access, int npages, int page_shift, struct mlx4_mr *mr) argument
533 mlx4_write_mtt_chunk(struct mlx4_dev *dev, struct mlx4_mtt *mtt, int start_index, int npages, u64 *page_list) argument
559 __mlx4_write_mtt(struct mlx4_dev *dev, struct mlx4_mtt *mtt, int start_index, int npages, u64 *page_list) argument
587 mlx4_write_mtt(struct mlx4_dev *dev, struct mlx4_mtt *mtt, int start_index, int npages, u64 *page_list) argument
717 mlx4_check_fmr(struct mlx4_fmr *fmr, u64 *page_list, int npages, u64 iova) argument
744 mlx4_map_phys_fmr(struct mlx4_dev *dev, struct mlx4_fmr *fmr, u64 *page_list, int npages, u64 iova, u32 *lkey, u32 *rkey) argument
[all...]
/freebsd-10.0-release/usr.sbin/lpr/filters/
H A Dlpf.c69 static int npages = 1; variable
203 npages++;
211 npages++;
215 printf("%7.2f\t%s:%s\n", (float)npages, host, name);
/freebsd-10.0-release/lib/libusbhid/
H A Dusage.c55 static int npages, npagesmax; variable
63 for (i = 0; i < npages; i++) {
126 if (npages >= npagesmax) {
140 curpage = &pages[npages++];
167 for (k = 0; k < npages; k++)
182 for (k = 0; k < npages; k++)
185 if (k >= npages)
211 for (k = 0; k < npages; k++)
229 for (k = 0; k < npages; k++)
/freebsd-10.0-release/sys/ofed/drivers/infiniband/hw/mthca/
H A Dmthca_allocator.c199 int npages, shift; local
206 npages = 1;
220 npages *= 2;
223 dma_list = kmalloc(npages * sizeof *dma_list, GFP_KERNEL);
227 for (i = 0; i < npages; ++i)
231 npages = (size + PAGE_SIZE - 1) / PAGE_SIZE;
234 dma_list = kmalloc(npages * sizeof *dma_list, GFP_KERNEL);
238 buf->page_list = kmalloc(npages * sizeof *buf->page_list,
243 for (i = 0; i < npages; ++i)
246 for (i = 0; i < npages;
[all...]
H A Dmthca_memfree.c68 pci_unmap_sg(dev->pdev, chunk->mem, chunk->npages,
71 for (i = 0; i < chunk->npages; ++i)
80 for (i = 0; i < chunk->npages; ++i) {
136 struct mthca_icm *mthca_alloc_icm(struct mthca_dev *dev, int npages, argument
156 while (npages > 0) {
164 chunk->npages = 0;
169 while (1 << cur_order > npages)
174 &chunk->mem[chunk->npages],
177 ret = mthca_alloc_icm_pages(&chunk->mem[chunk->npages],
181 ++chunk->npages;
631 int npages; local
[all...]
H A Dmthca_memfree.h53 int npages; member in struct:mthca_icm_chunk
82 struct mthca_icm *mthca_alloc_icm(struct mthca_dev *dev, int npages,
145 int npages; member in struct:mthca_db_table
/freebsd-10.0-release/sys/amd64/include/xen/
H A Dxenvar.h116 int xen_create_contiguous_region(vm_page_t pages, int npages);
118 void xen_destroy_contiguous_region(void * addr, int npages);
/freebsd-10.0-release/sys/i386/include/xen/
H A Dxenvar.h104 int xen_create_contiguous_region(vm_page_t pages, int npages);
106 void xen_destroy_contiguous_region(void * addr, int npages);
/freebsd-10.0-release/sys/kern/
H A Dsubr_mbpool.c89 u_int npages; /* current number of pages */ member in struct:mbpool
160 for (i = 0; i < p->npages; i++) {
203 if (p->npages == p->max_pages) {
210 pg = &p->pages[p->npages];
229 t->page = p->npages;
234 p->npages++;
306 for (i = 0; i < p->npages; i++) {
332 for (i = 0; i < p->npages; i++) {
/freebsd-10.0-release/sys/dev/virtio/balloon/
H A Dvirtio_balloon.c315 vtballoon_inflate(struct vtballoon_softc *sc, int npages) argument
323 if (npages > VTBALLOON_PAGES_PER_REQUEST)
324 npages = VTBALLOON_PAGES_PER_REQUEST;
326 for (i = 0; i < npages; i++) {
345 vtballoon_deflate(struct vtballoon_softc *sc, int npages) argument
355 if (npages > VTBALLOON_PAGES_PER_REQUEST)
356 npages = VTBALLOON_PAGES_PER_REQUEST;
358 for (i = 0; i < npages; i++) {
389 int npages)
399 npages * sizeo
388 vtballoon_send_page_frames(struct vtballoon_softc *sc, struct virtqueue *vq, int npages) argument
[all...]
/freebsd-10.0-release/sys/ofed/drivers/infiniband/core/
H A Dumem.c178 unsigned long npages; local
228 npages = PAGE_ALIGN(size + umem->offset) >> PAGE_SHIFT;
232 locked = npages + current->mm->locked_vm;
244 while (npages) {
246 min_t(unsigned long, npages,
254 npages -= ret;
318 vm_size_t npages;
334 npages = atop(end - start);
335 if (npages > vm_page_max_wired)
342 if (ptoa(npages
[all...]
/freebsd-10.0-release/sys/ofed/drivers/infiniband/hw/mlx4/
H A Dmr.c148 int *npages)
181 pages[*npages] = cur_start_addr + (mtt_size * k);
182 (*npages)++;
187 if (*npages == PAGE_SIZE / sizeof(u64)) {
190 *npages, pages);
194 (*start_index) += *npages;
195 *npages = 0;
214 int npages = 0; local
240 &npages);
259 &npages);
140 mlx4_ib_umem_write_mtt_block(struct mlx4_ib_dev *dev, struct mlx4_mtt *mtt, u64 mtt_size, u64 mtt_shift, u64 len, u64 cur_start_addr, u64 *pages, int *start_index, int *npages) argument
696 mlx4_ib_map_phys_fmr(struct ib_fmr *ibfmr, u64 *page_list, int npages, u64 iova) argument
[all...]
/freebsd-10.0-release/lib/libc/db/hash/
H A Dhash_buf.c300 int npages; local
303 npages = (nbytes + hashp->BSIZE - 1) >> hashp->BSHIFT;
304 npages = MAX(npages, MIN_BUFFERS);
306 hashp->nbufs = npages;
/freebsd-10.0-release/sys/dev/cxgbe/iw_cxgbe/
H A Dmem.c268 struct c4iw_mr *mhp, int shift, int npages)
273 if (npages > mhp->attr.pbl_size)
293 static int alloc_pbl(struct c4iw_mr *mhp, int npages) argument
296 npages << 3);
301 mhp->attr.pbl_size = npages;
308 u64 *total_size, int *npages,
345 *npages = 0;
347 *npages += (buffer_list[i].size +
350 if (!*npages)
353 *page_list = kmalloc(sizeof(u64) * *npages, GFP_KERNE
267 reregister_mem(struct c4iw_dev *rhp, struct c4iw_pd *php, struct c4iw_mr *mhp, int shift, int npages) argument
306 build_phys_page_list(struct ib_phys_buf *buffer_list, int num_phys_buf, u64 *iova_start, u64 *total_size, int *npages, int *shift, __be64 **page_list) argument
385 int npages = 0; local
446 int npages; local
[all...]
/freebsd-10.0-release/sys/dev/cxgbe/tom/
H A Dt4_ddp.c172 pages_to_nppods(int npages, int ddp_pgsz) argument
174 int nsegs = npages * PAGE_SIZE / ddp_pgsz;
612 bufcmp(struct ddp_buffer *db, vm_page_t *pages, int npages, int offset, int len) argument
616 if (db == NULL || db->npages != npages || db->offset != offset ||
620 for (i = 0; i < npages; i++) {
651 alloc_ddp_buffer(struct tom_data *td, vm_page_t *pages, int npages, int offset, argument
665 for (i = 0; i < npages; i++) {
667 while (i < npages - 1 &&
701 nppods = pages_to_nppods(npages, t4_ddp_pgs
806 select_ddp_buffer(struct adapter *sc, struct toepcb *toep, vm_page_t *pages, int npages, int db_off, int db_len) argument
885 int npages, db_idx, rc, buf_flag; local
[all...]
/freebsd-10.0-release/contrib/jemalloc/src/
H A Darena.c44 size_t pageind, size_t npages, bool maybe_adjac_pred,
47 size_t pageind, size_t npages, bool maybe_adjac_pred,
224 arena_avail_adjac_succ(arena_chunk_t *chunk, size_t pageind, size_t npages) argument
228 if (pageind+npages == chunk_npages)
231 assert(pageind+npages < chunk_npages);
232 ret = (arena_mapbits_allocated_get(chunk, pageind+npages) == 0);
234 != arena_mapbits_dirty_get(chunk, pageind+npages));
240 arena_avail_adjac(arena_chunk_t *chunk, size_t pageind, size_t npages) argument
244 arena_avail_adjac_succ(chunk, pageind, npages));
249 size_t npages, boo
248 arena_avail_insert(arena_t *arena, arena_chunk_t *chunk, size_t pageind, size_t npages, bool maybe_adjac_pred, bool maybe_adjac_succ) argument
281 arena_avail_remove(arena_t *arena, arena_chunk_t *chunk, size_t pageind, size_t npages, bool maybe_adjac_pred, bool maybe_adjac_succ) argument
362 arena_run_zero(arena_chunk_t *chunk, size_t run_ind, size_t npages) argument
716 size_t pageind, npages; local
1621 size_t npages, run_ind, past; local
1817 size_t npages = oldsize >> LG_PAGE; local
[all...]

Completed in 238 milliseconds

1234