LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 10-20-2023, 04:22 AM   #1
plznobug
LQ Newbie
 
Registered: Aug 2023
Posts: 10

Rep: Reputation: 0
Why does the Linux block layer limit the number of requests(tags) that can be dispatched to driver?


I have been studying the Linux kernel's block layer recently and have several questions that I can't figure out.

Currently, I know that upper layer IO enters the Linux block layer through submit_bio, which then calls make_request to obtain a request and puts it into a software queue (ctx->list or scheduler queue). Then, the queue_rq function is called to issue the request to the driver. This raises the following questions:

(1) If the scheduler is not enabled, the request is put into ctx->list before calling queue_rq to issue it to the driver. Why not directly call queue_rq to issue the request to the driver? It seems that putting the request into ctx->list has no meaning.

(2) If the scheduler is enabled, the request entering the scheduler queue needs to obtain a sched_tag, and if it fails to obtain one, the process will be blocked. Why is there a need to limit the number of requests entering the scheduler queue?

(3) When issuing to the driver, a driver tag needs to be obtained, and if it fails to obtain one, it will be blocked. Similarly, why is there a need to limit the number of requests entering the driver?

For (2) and (3), if unable to obtain tags, they will be blocked. So why not directly let them be issued to the driver since they will be asynchronous and wait for the requests to complete anyway? I don't understand the significance of limiting the quantity.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] mp3 tags inconsistency between Linux and Sansa Fuze (mp3 tags editing software?) Hungry ghost Linux - Software 3 12-17-2012 08:09 PM
Why IP (at Layer 3) needs MAC address (a Layer 2 information) ? Bringo General 8 05-21-2012 02:13 PM
DVD Drives - Dual Layer or double layer? Groundhog1248 Linux - Hardware 2 09-23-2009 09:30 PM
why sector number not match block number? bitzsk Linux - Kernel 1 06-09-2009 05:32 AM
What DVD recorders/writers burn dual-layer/double-layer DVD's under Linux? bgoodr Linux - Hardware 5 02-06-2008 03:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 04:49 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration