All of lore.kernel.org
 help / color / mirror / Atom feed
* io_u requeue and resubmit
@ 2013-09-09 18:32 Suresh P
  2013-09-09 21:18 ` Jens Axboe
  0 siblings, 1 reply; 3+ messages in thread
From: Suresh P @ 2013-09-09 18:32 UTC (permalink / raw)
  To: fio@vger.kernel.org

I have a question on requeue_io_u. Code source lines reference here are from version fio-2.1.2.

Does a requeued io_u work get submitted again through __get_io_u() ? If so, the io_u item is taken out of requeue list & then the io_u->file is set to NULL. We don't make a distinction about item being already setup Vs a new io_u in __get_io_u().�In get_io_u(), when an io_u may come out of requeue list, we depend on io_u->file to be non NULL to detect the work as old pending one.

Am I missing something here or is this a bug?

1274 � � � � io_u = __get_io_u(td);
1275 � � � � if (!io_u) {
1276 � � � � � � � � dprint(FD_IO, "__get_io_u failed\n");
1277 � � � � � � � � return NULL;
1278 � � � � }
1279�
1280 � � � � if (check_get_verify(td, io_u))
1281 � � � � � � � � goto out;
1282 � � � � if (check_get_trim(td, io_u))
1283 � � � � � � � � goto out;
1284�
1285 � � � � /*
1286 � � � � �* from a requeue, io_u already setup
1287 � � � � �*/
1288 � � � � if (io_u->file)
1289 � � � � � � � � goto out;
1290�
"io_u.c" line 1286 of 1667 --77%-- col 3-10


1130 struct io_u *__get_io_u(struct thread_data *td)
1131 {
1132 � � � � struct io_u *io_u;
1133�
1134 � � � � td_io_u_lock(td);
1135�
1136 again:
1137 � � � � if (!io_u_rempty(&td->io_u_requeues))
1138 � � � � � � � � io_u = io_u_rpop(&td->io_u_requeues);
1139 � � � � else if (!io_u_qempty(&td->io_u_freelist))
1140 � � � � � � � � io_u = io_u_qpop(&td->io_u_freelist);
1141�
1142 � � � � if (io_u) {
1143 � � � � � � � � io_u->buflen = 0;
1144 � � � � � � � � io_u->resid = 0;
1145 � � � � � � � � io_u->file = NULL;
1146 � � � � � � � � io_u->end_io = NULL;
1147 � � � � }
"io_u.c" line 1130 of 1667 --67%-- col 1

Thanks,
Suresh 		 	   		  

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-09-09 21:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-09 18:32 io_u requeue and resubmit Suresh P
2013-09-09 21:18 ` Jens Axboe
2013-09-09 21:51   ` Suresh P

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.