[BACK]Return to subr_pool.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / kern

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/sys/kern/subr_pool.c between version 1.200 and 1.200.6.1

version 1.200, 2013/03/11 21:37:54 version 1.200.6.1, 2014/05/18 17:46:07
Line 67  __KERNEL_RCSID(0, "$NetBSD$");
Line 67  __KERNEL_RCSID(0, "$NetBSD$");
  * an internal pool of page headers (`phpool').   * an internal pool of page headers (`phpool').
  */   */
   
 /* List of all pools */  /* List of all pools. Non static as needed by 'vmstat -i' */
 static TAILQ_HEAD(, pool) pool_head = TAILQ_HEAD_INITIALIZER(pool_head);  TAILQ_HEAD(, pool) pool_head = TAILQ_HEAD_INITIALIZER(pool_head);
   
 /* Private pool for page header structures */  /* Private pool for page header structures */
 #define PHPOOL_MAX      8  #define PHPOOL_MAX      8
Line 561  pool_init(struct pool *pp, size_t size, 
Line 561  pool_init(struct pool *pp, size_t size, 
         /* See the comment below about reserved bytes. */          /* See the comment below about reserved bytes. */
         trysize = palloc->pa_pagesz - ((align - ioff) % align);          trysize = palloc->pa_pagesz - ((align - ioff) % align);
         phsize = ALIGN(sizeof(struct pool_item_header));          phsize = ALIGN(sizeof(struct pool_item_header));
         if ((pp->pr_roflags & (PR_NOTOUCH | PR_NOALIGN)) == 0 &&          if (pp->pr_roflags & PR_PHINPAGE ||
               ((pp->pr_roflags & (PR_NOTOUCH | PR_NOALIGN)) == 0 &&
             (pp->pr_size < MIN(palloc->pa_pagesz / 16, phsize << 3) ||              (pp->pr_size < MIN(palloc->pa_pagesz / 16, phsize << 3) ||
             trysize / pp->pr_size == (trysize - phsize) / pp->pr_size)) {              trysize / pp->pr_size == (trysize - phsize) / pp->pr_size))) {
                 /* Use the end of the page for the page header */                  /* Use the end of the page for the page header */
                 pp->pr_roflags |= PR_PHINPAGE;                  pp->pr_roflags |= PR_PHINPAGE;
                 pp->pr_phoffset = off = palloc->pa_pagesz - phsize;                  pp->pr_phoffset = off = palloc->pa_pagesz - phsize;

Legend:
Removed from v.1.200  
changed lines
  Added in v.1.200.6.1

CVSweb <webmaster@jp.NetBSD.org>