Print this page
OS-881 To workaround OS-580 add support to only invalidate mappings from a single process

*** 19,28 **** --- 19,29 ---- * CDDL HEADER END */ /* * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. + * Copyright 2012 Joyent, Inc. All rights reserved. */ /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ /* All Rights Reserved */
*** 184,193 **** --- 185,195 ---- #define B_RETRYWRI 0x400000 /* retry write til works or bfinval */ #define B_FAILFAST 0x1000000 /* Fail promptly if device goes away */ #define B_STARTED 0x2000000 /* io:::start probe called for buf */ #define B_ABRWRITE 0x4000000 /* Application based recovery active */ #define B_PAGE_NOWAIT 0x8000000 /* Skip the page if it is locked */ + #define B_INVALCURONLY 0x10000000 /* invalidate only for curproc */ /* * There is some confusion over the meaning of B_FREE and B_INVAL and what * the use of one over the other implies. *
*** 196,205 **** --- 198,213 ---- * In the case of B_INVAL, the page will be destroyed (hashed out of it's * vnode) and placed on the freelist. Beyond this, there is no difference * between the sole use of these two flags. In both cases, IO will be done * if the page is not yet committed to storage. * + * The B_INVALCURONLY flag modifies the behavior of the B_INVAL flag and is + * intended to be used in conjunction with B_INVAL. B_INVALCURONLY has no + * meaning on its own. When both B_INVALCURONLY and B_INVAL are set, then + * the mapping for the page is only invalidated for the current process. + * In this case, the page is not destroyed unless this was the final mapping. + * * In order to discard pages without writing them back, (B_INVAL | B_TRUNC) * should be used. * * Use (B_INVAL | B_FORCE) to force the page to be destroyed even if we * could not successfuly write out the page.