Print this page
OS-3088 need a lighterweight page invalidation mechanism for zone memcap
OS-881 To workaround OS-580 add support to only invalidate mappings from a single process
        
*** 19,28 ****
--- 19,29 ----
   * CDDL HEADER END
   */
  /*
   * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
   * Use is subject to license terms.
+  * Copyright 2014 Joyent, Inc.  All rights reserved.
   */
  
  /*      Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
  /*        All Rights Reserved   */
  
*** 267,278 ****
   *      and non zero if enabled.  If flag specifes multiple attributs
   *      then returns 0 if ALL atriibutes are disabled.  This is an advisory
   *      call.
   *
   * int hat_pageunload(pp, forceflag)
!  *      unload all translations attached to pp.
   *
   * uint_t hat_pagesync(pp, flags)
   *      get hw stats from hardware into page struct and reset hw stats
   *      returns attributes of page
   *
   * ulong_t hat_page_getshare(pp)
--- 268,284 ----
   *      and non zero if enabled.  If flag specifes multiple attributs
   *      then returns 0 if ALL atriibutes are disabled.  This is an advisory
   *      call.
   *
   * int hat_pageunload(pp, forceflag)
!  *      Unload all translations attached to pp. On x86 the bulk of the work is
!  *      done by hat_page_inval.
   *
+  * void hat_page_inval(pp, pgsz, curhat)
+  *      Unload translations attached to pp. If curhat is provided, only the
+  *      translation for that process is unloaded, otherwise all are unloaded.
+  *
   * uint_t hat_pagesync(pp, flags)
   *      get hw stats from hardware into page struct and reset hw stats
   *      returns attributes of page
   *
   * ulong_t hat_page_getshare(pp)
*** 289,298 ****
--- 295,305 ----
  
  void    hat_page_setattr(struct page *, uint_t);
  void    hat_page_clrattr(struct page *, uint_t);
  uint_t  hat_page_getattr(struct page *, uint_t);
  int     hat_pageunload(struct page *, uint_t);
+ void    hat_page_inval(struct page *, uint_t, struct hat *);
  uint_t  hat_pagesync(struct page *, uint_t);
  ulong_t hat_page_getshare(struct page *);
  int     hat_page_checkshare(struct page *, ulong_t);
  faultcode_t hat_softlock(struct hat *, caddr_t, size_t *,
                          struct page **, uint_t);
*** 458,467 ****
--- 465,475 ----
  /*
   * Flag for hat_pageunload
   */
  #define HAT_ADV_PGUNLOAD        0x00
  #define HAT_FORCE_PGUNLOAD      0x01
+ #define HAT_CURPROC_PGUNLOAD    0x02
  
  /*
   * Attributes for hat_page_*attr, hat_setstats and
   * returned by hat_pagesync.
   */