mirror of
				git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
				synced 2025-10-31 16:54:21 +00:00 
			
		
		
		
	io_uring/rw: enable bio caches for IRQ rw
Now we can use IOCB_ALLOC_CACHE not only for iopoll'ed reads/write but also for normal IRQ driven I/O. Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/fb8bd092ed5a4a3b037e84e4777074d07aa5639a.1667384020.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
		
							parent
							
								
									42b2b2fb6e
								
							
						
					
					
						commit
						12e4e8c7ab
					
				
					 1 changed files with 2 additions and 1 deletions
				
			
		|  | @ -665,6 +665,7 @@ static int io_rw_init_file(struct io_kiocb *req, fmode_t mode) | ||||||
| 	ret = kiocb_set_rw_flags(kiocb, rw->flags); | 	ret = kiocb_set_rw_flags(kiocb, rw->flags); | ||||||
| 	if (unlikely(ret)) | 	if (unlikely(ret)) | ||||||
| 		return ret; | 		return ret; | ||||||
|  | 	kiocb->ki_flags |= IOCB_ALLOC_CACHE; | ||||||
| 
 | 
 | ||||||
| 	/*
 | 	/*
 | ||||||
| 	 * If the file is marked O_NONBLOCK, still allow retry for it if it | 	 * If the file is marked O_NONBLOCK, still allow retry for it if it | ||||||
|  | @ -680,7 +681,7 @@ static int io_rw_init_file(struct io_kiocb *req, fmode_t mode) | ||||||
| 			return -EOPNOTSUPP; | 			return -EOPNOTSUPP; | ||||||
| 
 | 
 | ||||||
| 		kiocb->private = NULL; | 		kiocb->private = NULL; | ||||||
| 		kiocb->ki_flags |= IOCB_HIPRI | IOCB_ALLOC_CACHE; | 		kiocb->ki_flags |= IOCB_HIPRI; | ||||||
| 		kiocb->ki_complete = io_complete_rw_iopoll; | 		kiocb->ki_complete = io_complete_rw_iopoll; | ||||||
| 		req->iopoll_completed = 0; | 		req->iopoll_completed = 0; | ||||||
| 	} else { | 	} else { | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Pavel Begunkov
						Pavel Begunkov