.\" This manpage has been automatically generated by docbook2man
.\" from a DocBook document. This tool can be found at:
.\"
.\" Please send any bug reports, improvements, comments, patches,
.\" etc. to Steve Cheng .
.TH "UNMAP_VMAS" "" "06 October 2005" "" ""
.SH NAME
unmap_vmas \- unmap a range of memory covered by a list of vma's
.SH SYNOPSIS
"SYNOPSIS"
.sp
\fB
.sp
int unmap_vmas (struct mmu_gather ** \fItlbp\fB, struct mm_struct * \fImm\fB, struct vm_area_struct * \fIvma\fB, unsigned long \fIstart_addr\fB, unsigned long \fIend_addr\fB, unsigned long * \fInr_accounted\fB);
\fR
.SH "ARGUMENTS"
.TP
\fB\fItlbp\fB\fR
address of the caller's struct mmu_gather
.TP
\fB\fImm\fB\fR
the controlling mm_struct
.TP
\fB\fIvma\fB\fR
the starting vma
.TP
\fB\fIstart_addr\fB\fR
virtual address at which to start unmapping
.TP
\fB\fIend_addr\fB\fR
virtual address at which to end unmapping
.TP
\fB\fInr_accounted\fB\fR
Place number of unmapped pages in vm-accountable vma's here
.SH "DESCRIPTION"
.PP
Returns the number of vma's which were covered by the unmapping.
.PP
Unmap all pages in the vma list. Called under page_table_lock.
.PP
We aim to not hold page_table_lock for too long (for scheduling latency
reasons). So zap pages in ZAP_BLOCK_SIZE bytecounts. This means we need to
return the ending mmu_gather to the caller.
.PP
Only addresses between `start' and `end' will be unmapped.
.PP
The VMA list must be sorted in ascending virtual address order.
.PP
\fBunmap_vmas\fR assumes that the caller will flush the whole unmapped address
range after \fBunmap_vmas\fR returns. So the only responsibility here is to
ensure that any thus-far unmapped pages are flushed before \fBunmap_vmas\fR
drops the lock and schedules.