Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 161095
b: refs/heads/master
c: 41e05a1
h: refs/heads/master
i:
  161093: 5d32bae
  161091: d5096af
  161087: 9e9e5d6
v: v3
  • Loading branch information
Heiko Carstens authored and James Bottomley committed Sep 5, 2009
1 parent 17f6b1f commit 67ca64a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b592e89ac9af521be164490e45c53c93e89c776f
refs/heads/master: 41e05a12c7aae16f0381103af3e5ca791e87ce59
2 changes: 1 addition & 1 deletion trunk/drivers/s390/scsi/zfcp_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ struct zfcp_qdio {
struct zfcp_qdio_queue req_q;
spinlock_t stat_lock;
spinlock_t req_q_lock;
ktime_t req_q_time;
unsigned long long req_q_time;
u64 req_q_util;
atomic_t req_q_full;
wait_queue_head_t req_q_wq;
Expand Down
11 changes: 5 additions & 6 deletions trunk/drivers/s390/scsi/zfcp_qdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,15 @@ static void zfcp_qdio_zero_sbals(struct qdio_buffer *sbal[], int first, int cnt)
}

/* this needs to be called prior to updating the queue fill level */
static void zfcp_qdio_account(struct zfcp_qdio *qdio)
static inline void zfcp_qdio_account(struct zfcp_qdio *qdio)
{
ktime_t now;
s64 span;
unsigned long long now, span;
int free, used;

spin_lock(&qdio->stat_lock);
now = ktime_get();
span = ktime_us_delta(now, qdio->req_q_time);
free = max(0, atomic_read(&qdio->req_q.count));
now = get_clock_monotonic();
span = (now - qdio->req_q_time) >> 12;
free = atomic_read(&qdio->req_q.count);
used = QDIO_MAX_BUFFERS_PER_Q - free;
qdio->req_q_util += used * span;
qdio->req_q_time = now;
Expand Down

0 comments on commit 67ca64a

Please sign in to comment.