Skip to content

Commit 97d2a80

Browse files
bcrlLinus Torvalds
authored andcommitted
[PATCH] aio: remove ki_retried debugging member
Remove the ki_retried member from struct kiocb. I think the idea was bounced around a while back, but Arnaldo pointed out another reason that we should dig it up when he pointed out that the last cacheline of struct kiocb only contains 4 bytes. By removing the debugging member, we save more than the 8 byte on 64 bit machines. Signed-off-by: Benjamin LaHaise <bcrl@kvack.org> Acked-by: Ken Chen <kenneth.w.chen@intel.com> Acked-by: Zach Brown <zach.brown@oracle.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
1 parent b62e8ec commit 97d2a80

2 files changed

Lines changed: 0 additions & 17 deletions

File tree

‎fs/aio.c‎

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -666,17 +666,6 @@ static ssize_t aio_run_iocb(struct kiocb *iocb)
666666
ssize_t (*retry)(struct kiocb *);
667667
ssize_t ret;
668668

669-
if (iocb->ki_retried++ > 1024*1024) {
670-
printk("Maximal retry count. Bytes done %Zd\n",
671-
iocb->ki_nbytes - iocb->ki_left);
672-
return -EAGAIN;
673-
}
674-
675-
if (!(iocb->ki_retried & 0xff)) {
676-
pr_debug("%ld retry: %zd of %zd\n", iocb->ki_retried,
677-
iocb->ki_nbytes - iocb->ki_left, iocb->ki_nbytes);
678-
}
679-
680669
if (!(retry = iocb->ki_retry)) {
681670
printk("aio_run_iocb: iocb->ki_retry = NULL\n");
682671
return 0;
@@ -1005,9 +994,6 @@ int fastcall aio_complete(struct kiocb *iocb, long res, long res2)
1005994
kunmap_atomic(ring, KM_IRQ1);
1006995

1007996
pr_debug("added to ring %p at [%lu]\n", iocb, tail);
1008-
1009-
pr_debug("%ld retries: %zd of %zd\n", iocb->ki_retried,
1010-
iocb->ki_nbytes - iocb->ki_left, iocb->ki_nbytes);
1011997
put_rq:
1012998
/* everything turned out well, dispose of the aiocb. */
1013999
ret = __aio_put_req(ctx, iocb);
@@ -1590,7 +1576,6 @@ int fastcall io_submit_one(struct kioctx *ctx, struct iocb __user *user_iocb,
15901576
req->ki_opcode = iocb->aio_lio_opcode;
15911577
init_waitqueue_func_entry(&req->ki_wait, aio_wake_function);
15921578
INIT_LIST_HEAD(&req->ki_wait.task_list);
1593-
req->ki_retried = 0;
15941579

15951580
ret = aio_setup_iocb(req);
15961581

‎include/linux/aio.h‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ struct kiocb {
111111
size_t ki_nbytes; /* copy of iocb->aio_nbytes */
112112
char __user *ki_buf; /* remaining iocb->aio_buf */
113113
size_t ki_left; /* remaining bytes */
114-
long ki_retried; /* just for testing */
115114
struct iovec ki_inline_vec; /* inline vector */
116115
struct iovec *ki_iovec;
117116
unsigned long ki_nr_segs;
@@ -238,7 +237,6 @@ do { \
238237
} while (0)
239238

240239
#define io_wait_to_kiocb(wait) container_of(wait, struct kiocb, ki_wait)
241-
#define is_retried_kiocb(iocb) ((iocb)->ki_retried > 1)
242240

243241
#include <linux/aio_abi.h>
244242

0 commit comments

Comments
 (0)