diff options
author | Bryan Cantrill <bryan@joyent.com> | 2012-03-28 19:18:04 +0000 |
---|---|---|
committer | Bryan Cantrill <bryan@joyent.com> | 2012-03-28 19:18:04 +0000 |
commit | d0bf2cb9f5d040c9eb24954ea34580b402377300 (patch) | |
tree | 44366d06d6b30478b7bb78f65babda854e77c744 /usr/src | |
parent | 81ec5430b8d8c635b14871820f7667e220c3db2c (diff) | |
download | illumos-joyent-d0bf2cb9f5d040c9eb24954ea34580b402377300.tar.gz |
2638 page coalescing can dissociate locked pages from their pfn
Reviewed by: Richard Lowe <richlowe@richlowe.net>
Reviewed by: Milan Jurik <jurikm@xylab.cz>
Reviewed by: Theo Schlossnagle <jesus@omniti.com>
Reviewed by: Gordon Ross <gwr@nexenta.com>
Reviewed by: Garrett D'Amore <garrett@damore.org>
Approved by: Eric Schrock <eric.schrock@delphix.com>
Diffstat (limited to 'usr/src')
-rw-r--r-- | usr/src/uts/common/vm/vm_pagelist.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/usr/src/uts/common/vm/vm_pagelist.c b/usr/src/uts/common/vm/vm_pagelist.c index a9685cce0a..ff4eb5e0a0 100644 --- a/usr/src/uts/common/vm/vm_pagelist.c +++ b/usr/src/uts/common/vm/vm_pagelist.c @@ -22,6 +22,10 @@ * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. */ +/* + * Copyright 2012 Joyent, Inc. All rights reserved. + */ + /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ /* All Rights Reserved */ @@ -3181,7 +3185,14 @@ skipptcpcheck: page_unlock_nocapture(pp); return (0); } - if (PP_ISNORELOC(pp)) { + + /* + * If a page has been marked non-relocatable or has been + * explicitly locked in memory, we don't want to relocate it; + * unlock the pages and fail the operation. + */ + if (PP_ISNORELOC(pp) || + pp->p_lckcnt != 0 || pp->p_cowcnt != 0) { VM_STAT_ADD(vmm_vmstats.ptcpfailcage[szc]); while (i != (pgcnt_t)-1) { pp = &spp[i]; |