Changeset View
Changeset View
Standalone View
Standalone View
sys/kern/uipc_shm.c
| Show First 20 Lines • Show All 823 Lines • ▼ Show 20 Lines | #endif | ||||
| try = 0; | try = 0; | ||||
| /* | /* | ||||
| * Extend shmfd and object, keeping all already fully | * Extend shmfd and object, keeping all already fully | ||||
| * allocated large pages intact even on error, because dropped | * allocated large pages intact even on error, because dropped | ||||
| * object lock might allowed mapping of them. | * object lock might allowed mapping of them. | ||||
| */ | */ | ||||
| while (object->size < newobjsz) { | while (object->size < newobjsz) { | ||||
| error = sig_intr(); | |||||
| if (error != 0) | |||||
| return (error); | |||||
| m = vm_page_alloc_contig(object, object->size, aflags, | m = vm_page_alloc_contig(object, object->size, aflags, | ||||
| pagesizes[psind] / PAGE_SIZE, 0, ~0, | pagesizes[psind] / PAGE_SIZE, 0, ~0, | ||||
| pagesizes[psind], 0, | pagesizes[psind], 0, | ||||
| VM_MEMATTR_DEFAULT); | VM_MEMATTR_DEFAULT); | ||||
| if (m == NULL) { | if (m == NULL) { | ||||
| VM_OBJECT_WUNLOCK(object); | VM_OBJECT_WUNLOCK(object); | ||||
| error = sig_intr(); | |||||
| if (error != 0) { | |||||
| VM_OBJECT_WLOCK(object); | |||||
| return (error); | |||||
| } | |||||
| if (shmfd->shm_lp_alloc_policy == | if (shmfd->shm_lp_alloc_policy == | ||||
| SHM_LARGEPAGE_ALLOC_NOWAIT || | SHM_LARGEPAGE_ALLOC_NOWAIT || | ||||
| (shmfd->shm_lp_alloc_policy == | (shmfd->shm_lp_alloc_policy == | ||||
| SHM_LARGEPAGE_ALLOC_DEFAULT && | SHM_LARGEPAGE_ALLOC_DEFAULT && | ||||
| try >= largepage_reclaim_tries)) { | try >= largepage_reclaim_tries)) { | ||||
| VM_OBJECT_WLOCK(object); | VM_OBJECT_WLOCK(object); | ||||
| return (ENOMEM); | return (ENOMEM); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 1,398 Lines • Show Last 20 Lines | |||||