Date:        Tue, 12 Mar 2019 23:21:59 -0700
    From:        Jason Thorpe <[email protected]>
    Message-ID:  <[email protected]>

  | THAT is particularly special, because the code in question is:
  |
  | <snip>
  | void
  | uvm_pagewire(struct vm_page *pg)
  | {
  |         KASSERT(mutex_owned(&uvm_pageqlock));
  | #if defined(READAHEAD_STATS)
  |         if ((pg->pqflags & PQ_READAHEAD) != 0) {
  |                 uvm_ra_hit.ev_count++;
  |                 pg->pqflags &= ~PQ_READAHEAD;
  |         }
  | #endif /* defined(READAHEAD_STATS) */
  |         if (pg->wire_count == 0) {
  |                 uvm_pagedequeue(pg);
  |                 uvmexp.wired++;
  |         }
  |         pg->wire_count++;
  |         KASSERT(pg->wire_count > 0);    /* detect wraparound */
  | }
  | </snip>

Actually, that probably also explains why my kernel is not crashing.
I don't have DIAGNOSTIC enabled, so that KASSERT() does not happen
in my kernel.   Realised that when I was about to add the KASSERT
you suggested...   I will change that while continuing to test this.

kre

Reply via email to