[BACK]Return to bufq_priocscan.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/bufq_priocscan.c between version 1.3 and 1.8

version 1.3, 2004/11/25 04:52:24 version 1.8, 2006/05/22 12:42:01
Line 33  __KERNEL_RCSID(0, "$NetBSD$");
Line 33  __KERNEL_RCSID(0, "$NetBSD$");
 #include <sys/systm.h>  #include <sys/systm.h>
 #include <sys/buf.h>  #include <sys/buf.h>
 #include <sys/bufq.h>  #include <sys/bufq.h>
   #include <sys/bufq_impl.h>
 #include <sys/malloc.h>  #include <sys/malloc.h>
   
 /*  /*
Line 46  struct cscan_queue {
Line 47  struct cscan_queue {
         daddr_t cq_lastrawblkno;        /* b_rawblkno of the last request */          daddr_t cq_lastrawblkno;        /* b_rawblkno of the last request */
 };  };
   
 static int __inline cscan_empty(const struct cscan_queue *);  static inline int cscan_empty(const struct cscan_queue *);
 static void cscan_put(struct cscan_queue *, struct buf *, int);  static void cscan_put(struct cscan_queue *, struct buf *, int);
 static struct buf *cscan_get(struct cscan_queue *, int);  static struct buf *cscan_get(struct cscan_queue *, int);
 static void cscan_init(struct cscan_queue *);  static void cscan_init(struct cscan_queue *);
   
 static __inline int  static inline int
 cscan_empty(const struct cscan_queue *q)  cscan_empty(const struct cscan_queue *q)
 {  {
   
Line 167  static void bufq_priocscan_init(struct b
Line 168  static void bufq_priocscan_init(struct b
 static void bufq_priocscan_put(struct bufq_state *, struct buf *);  static void bufq_priocscan_put(struct bufq_state *, struct buf *);
 static struct buf *bufq_priocscan_get(struct bufq_state *, int);  static struct buf *bufq_priocscan_get(struct bufq_state *, int);
   
 BUFQ_DEFINE(priocscan, BUFQ_PRIOCSCAN, bufq_priocscan_init);  BUFQ_DEFINE(priocscan, 40, bufq_priocscan_init);
   
 static __inline struct cscan_queue *bufq_priocscan_selectqueue(  static inline struct cscan_queue *bufq_priocscan_selectqueue(
     struct bufq_priocscan *, const struct buf *);      struct bufq_priocscan *, const struct buf *);
   
 static __inline struct cscan_queue *  static inline struct cscan_queue *
 bufq_priocscan_selectqueue(struct bufq_priocscan *q, const struct buf *bp)  bufq_priocscan_selectqueue(struct bufq_priocscan *q, const struct buf *bp)
 {  {
         static const int priocscan_priomap[] = {          static const int priocscan_priomap[] = {
Line 238  bufq_priocscan_get(struct bufq_state *bu
Line 239  bufq_priocscan_get(struct bufq_state *bu
                 /*                  /*
                  * XXX account only by number of requests.  is it good enough?                   * XXX account only by number of requests.  is it good enough?
                  */                   */
                 pq->q_burst--;                  if (remove) {
                           pq->q_burst--;
                   }
         } else {          } else {
                 /*                  /*
                  * no queue was selected due to burst counts                   * no queue was selected due to burst counts
Line 256  bufq_priocscan_get(struct bufq_state *bu
Line 259  bufq_priocscan_get(struct bufq_state *bu
                 /*                  /*
                  * reset burst counts                   * reset burst counts
                  */                   */
                 for (i = 0; i < PRIOCSCAN_NQUEUE; i++) {                  if (remove) {
                         pq = &q->bq_queue[i];                          for (i = 0; i < PRIOCSCAN_NQUEUE; i++) {
                         pq->q_burst = priocscan_burst[i];                                  pq = &q->bq_queue[i];
                                   pq->q_burst = priocscan_burst[i];
                           }
                 }                  }
   
                 /*                  /*

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.8

CVSweb <webmaster@jp.NetBSD.org>