Is there any performance measurement from before and after. It would be
nice to see them.

On Saturday, December 28, 2019, Mark Johnston <ma...@freebsd.org> wrote:

> Author: markj
> Date: Sat Dec 28 19:04:29 2019
> New Revision: 356159
> URL: https://svnweb.freebsd.org/changeset/base/356159
>
> Log:
>   Remove some unused functions.
>
>   The previous series of patches orphaned some vm_page functions, so
>   remove them.
>
>   Reviewed by:  dougm, kib
>   Sponsored by: Netflix, Intel
>   Differential Revision:        https://reviews.freebsd.org/D22886
>
> Modified:
>   head/sys/vm/vm_page.c
>   head/sys/vm/vm_page.h
>
> Modified: head/sys/vm/vm_page.c
> ============================================================
> ==================
> --- head/sys/vm/vm_page.c       Sat Dec 28 19:04:15 2019        (r356158)
> +++ head/sys/vm/vm_page.c       Sat Dec 28 19:04:29 2019        (r356159)
> @@ -3662,52 +3662,6 @@ vm_page_enqueue(vm_page_t m, uint8_t queue)
>  }
>
>  /*
> - *     vm_page_requeue:                [ internal use only ]
> - *
> - *     Schedule a requeue of the given page.
> - *
> - *     The page must be locked.
> - */
> -void
> -vm_page_requeue(vm_page_t m)
> -{
> -
> -       vm_page_assert_locked(m);
> -       KASSERT(vm_page_queue(m) != PQ_NONE,
> -           ("%s: page %p is not logically enqueued", __func__, m));
> -       KASSERT(m->ref_count > 0,
> -           ("%s: page %p does not carry any references", __func__, m));
> -
> -       if ((m->a.flags & PGA_REQUEUE) == 0)
> -               vm_page_aflag_set(m, PGA_REQUEUE);
> -       vm_page_pqbatch_submit(m, atomic_load_8(&m->a.queue));
> -}
> -
> -/*
> - *     vm_page_swapqueue:              [ internal use only ]
> - *
> - *     Move the page from one queue to another, or to the tail of its
> - *     current queue, in the face of a possible concurrent free of the
> - *     page.
> - */
> -void
> -vm_page_swapqueue(vm_page_t m, uint8_t oldq, uint8_t newq)
> -{
> -       vm_page_astate_t new, old;
> -
> -       old = vm_page_astate_load(m);
> -       do {
> -               if (old.queue != oldq || (old.flags & PGA_DEQUEUE) != 0)
> -                       return;
> -               new = old;
> -               new.flags |= PGA_REQUEUE;
> -               new.queue = newq;
> -       } while (!vm_page_pqstate_commit_dequeue(m, &old, new));
> -
> -       vm_page_pqbatch_submit(m, newq);
> -}
> -
> -/*
>   *     vm_page_free_prep:
>   *
>   *     Prepares the given page to be put on the free list,
>
> Modified: head/sys/vm/vm_page.h
> ============================================================
> ==================
> --- head/sys/vm/vm_page.h       Sat Dec 28 19:04:15 2019        (r356158)
> +++ head/sys/vm/vm_page.h       Sat Dec 28 19:04:29 2019        (r356159)
> @@ -649,7 +649,6 @@ bool vm_page_remove_xbusy(vm_page_t);
>  int vm_page_rename(vm_page_t, vm_object_t, vm_pindex_t);
>  void vm_page_replace(vm_page_t mnew, vm_object_t object,
>      vm_pindex_t pindex, vm_page_t mold);
> -void vm_page_requeue(vm_page_t m);
>  int vm_page_sbusied(vm_page_t m);
>  vm_page_t vm_page_scan_contig(u_long npages, vm_page_t m_start,
>      vm_page_t m_end, u_long alignment, vm_paddr_t boundary, int options);
> @@ -659,7 +658,6 @@ int vm_page_sleep_if_busy(vm_page_t m, const char *msg
>  int vm_page_sleep_if_xbusy(vm_page_t m, const char *msg);
>  vm_offset_t vm_page_startup(vm_offset_t vaddr);
>  void vm_page_sunbusy(vm_page_t m);
> -void vm_page_swapqueue(vm_page_t m, uint8_t oldq, uint8_t newq);
>  bool vm_page_try_remove_all(vm_page_t m);
>  bool vm_page_try_remove_write(vm_page_t m);
>  int vm_page_trysbusy(vm_page_t m);
> @@ -833,31 +831,6 @@ vm_page_aflag_set(vm_page_t m, uint16_t bits)
>         addr = (void *)&m->a;
>         val = bits << VM_PAGE_AFLAG_SHIFT;
>         atomic_set_32(addr, val);
> -}
> -
> -/*
> - *     Atomically update the queue state of the page.  The operation
> fails if
> - *     any of the queue flags in "fflags" are set or if the "queue" field
> of
> - *     the page does not match the expected value; if the operation is
> - *     successful, the flags in "nflags" are set and all other queue state
> - *     flags are cleared.
> - */
> -static inline bool
> -vm_page_pqstate_cmpset(vm_page_t m, uint32_t oldq, uint32_t newq,
> -    uint32_t fflags, uint32_t nflags)
> -{
> -       vm_page_astate_t new, old;
> -
> -       old = vm_page_astate_load(m);
> -       do {
> -               if ((old.flags & fflags) != 0 || old.queue != oldq)
> -                       return (false);
> -               new = old;
> -               new.flags = (new.flags & ~PGA_QUEUE_OP_MASK) | nflags;
> -               new.queue = newq;
> -       } while (!vm_page_astate_fcmpset(m, &old, new));
> -
> -       return (true);
>  }
>
>  /*
> _______________________________________________
> svn-src-h...@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/svn-src-head
> To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
>
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to