Subject: Questions about bufq_readprio.c,
To: None <tech-kern@netbsd.org>
From: Sumantra Kundu <sumantra@gmail.com>
List: tech-kern
Date: 09/27/2007 10:58:37
Hi All,
         As I was working on the code of  bufq_readprio.c, I
encountered some questions/doubts:

Any help/suggestions would be greatly appreciated!

Thanks,
--Sumantra

1) Inside the bufq_readprio.c, function:bufq_prio_put(struct
bufq_state *bufq, struct buf *bp)
  if (bp->b_flags & B_READ) == B_READ){
   struct vnode *vptr = bp->b_vp;
 }
   How come in vptr= NULL always?  Consequently, the uvm_object is also NULL??
   Aren't the requests are mapped-in to uvm pages?

2) For   if (bp->b_flags & B_READ) == B_READ)

 I printed the following fields in  struct buf *bp;
 printf ("\n bufsize [%d] bcount [%d] bres_id [%d] Address = [%llu]",
           bp->b_bufsize,
           bp->b_bcount,
           bp->b_resid,
           PTRTOUINT64(bp->b_saveaddr))

 bufsize [8192] bcount [8192] bres_id [0] Address = [134541312]
 bufsize [8192] bcount [8192] bres_id [0] Address = [134541312]
 bufsize [8192] bcount [8192] bres_id [27226] Address = [134541312]
 bufsize [8192] bcount [8192] bres_id [27226] Address = [134541312]
 bufsize [8192] bcount [8192] bres_id [47544] Address = [134541312]
 bufsize [8192] bcount [8192] bres_id [47544] Address = [134541312]

How come the "bres" values are consequently the same {0,27226,4744}.
Isn't bufq_prio_put() supposed to be called with different values of
buffer addresses?
Also, what does bres really imply? In the code it says " /* Remaining I/O. */"