Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci-2.6.23
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci-2.6.23
Commits
3ed9a296
Commit
3ed9a296
authored
Apr 23, 2007
by
Jens Axboe
Committed by
Jens Axboe
Apr 30, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cfq-iosched: improve sync vs async workloads
Signed-off-by:
Jens Axboe
<
jens.axboe@oracle.com
>
parent
1be92f2f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
13 deletions
+18
-13
block/cfq-iosched.c
block/cfq-iosched.c
+18
-13
No files found.
block/cfq-iosched.c
View file @
3ed9a296
...
...
@@ -96,6 +96,7 @@ struct cfq_data {
struct
hlist_head
*
cfq_hash
;
int
rq_in_driver
;
int
sync_flight
;
int
hw_tag
;
/*
...
...
@@ -911,11 +912,15 @@ static void cfq_arm_slice_timer(struct cfq_data *cfqd)
*/
static
void
cfq_dispatch_insert
(
request_queue_t
*
q
,
struct
request
*
rq
)
{
struct
cfq_data
*
cfqd
=
q
->
elevator
->
elevator_data
;
struct
cfq_queue
*
cfqq
=
RQ_CFQQ
(
rq
);
cfq_remove_request
(
rq
);
cfqq
->
dispatched
++
;
elv_dispatch_sort
(
q
,
rq
);
if
(
cfq_cfqq_sync
(
cfqq
))
cfqd
->
sync_flight
++
;
}
/*
...
...
@@ -1100,27 +1105,24 @@ static int cfq_dispatch_requests(request_queue_t *q, int force)
while
((
cfqq
=
cfq_select_queue
(
cfqd
))
!=
NULL
)
{
int
max_dispatch
;
if
(
cfqd
->
busy_queues
>
1
)
{
/*
* So we have dispatched before in this round, if the
* next queue has idling enabled (must be sync), don't
* allow it service until the previous have completed.
*/
if
(
cfqd
->
rq_in_driver
&&
cfq_cfqq_idle_window
(
cfqq
)
&&
dispatched
)
max_dispatch
=
cfqd
->
cfq_quantum
;
if
(
cfq_class_idle
(
cfqq
))
max_dispatch
=
1
;
if
(
cfqq
->
dispatched
>=
max_dispatch
)
{
if
(
cfqd
->
busy_queues
>
1
)
break
;
if
(
cfqq
->
dispatched
>=
cfqd
->
cfq_quantum
)
if
(
cfqq
->
dispatched
>=
4
*
max_dispatch
)
break
;
}
if
(
cfqd
->
sync_flight
&&
!
cfq_cfqq_sync
(
cfqq
))
break
;
cfq_clear_cfqq_must_dispatch
(
cfqq
);
cfq_clear_cfqq_wait_request
(
cfqq
);
del_timer
(
&
cfqd
->
idle_slice_timer
);
max_dispatch
=
cfqd
->
cfq_quantum
;
if
(
cfq_class_idle
(
cfqq
))
max_dispatch
=
1
;
dispatched
+=
__cfq_dispatch_requests
(
cfqd
,
cfqq
,
max_dispatch
);
}
...
...
@@ -1767,6 +1769,9 @@ static void cfq_completed_request(request_queue_t *q, struct request *rq)
cfqd
->
rq_in_driver
--
;
cfqq
->
dispatched
--
;
if
(
cfq_cfqq_sync
(
cfqq
))
cfqd
->
sync_flight
--
;
if
(
!
cfq_class_idle
(
cfqq
))
cfqd
->
last_end_request
=
now
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment