Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
a90d742e
Commit
a90d742e
authored
Mar 18, 2006
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] don't bother with refcounting for cfq_data
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
483f4afc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
21 deletions
+7
-21
block/cfq-iosched.c
block/cfq-iosched.c
+7
-21
No files found.
block/cfq-iosched.c
View file @
a90d742e
...
...
@@ -114,7 +114,6 @@ static struct completion *ioc_gone;
* Per block device queue structure
*/
struct
cfq_data
{
atomic_t
ref
;
request_queue_t
*
queue
;
/*
...
...
@@ -295,7 +294,6 @@ CFQ_CRQ_FNS(is_sync);
static
struct
cfq_queue
*
cfq_find_cfq_hash
(
struct
cfq_data
*
,
unsigned
int
,
unsigned
short
);
static
void
cfq_dispatch_insert
(
request_queue_t
*
,
struct
cfq_rq
*
);
static
void
cfq_put_cfqd
(
struct
cfq_data
*
cfqd
);
static
struct
cfq_queue
*
cfq_get_queue
(
struct
cfq_data
*
cfqd
,
unsigned
int
key
,
struct
task_struct
*
tsk
,
gfp_t
gfp_mask
);
#define process_sync(tsk) ((tsk)->flags & PF_SYNCWRITE)
...
...
@@ -1168,8 +1166,6 @@ static void cfq_put_queue(struct cfq_queue *cfqq)
if
(
unlikely
(
cfqd
->
active_queue
==
cfqq
))
__cfq_slice_expired
(
cfqd
,
cfqq
,
0
);
cfq_put_cfqd
(
cfqq
->
cfqd
);
/*
* it's on the empty list and still hashed
*/
...
...
@@ -1442,7 +1438,6 @@ cfq_get_queue(struct cfq_data *cfqd, unsigned int key, struct task_struct *tsk,
hlist_add_head
(
&
cfqq
->
cfq_hash
,
&
cfqd
->
cfq_hash
[
hashval
]);
atomic_set
(
&
cfqq
->
ref
,
0
);
cfqq
->
cfqd
=
cfqd
;
atomic_inc
(
&
cfqd
->
ref
);
cfqq
->
service_last
=
0
;
/*
* set ->slice_left to allow preemption for a new process
...
...
@@ -2144,19 +2139,6 @@ static void cfq_shutdown_timer_wq(struct cfq_data *cfqd)
blk_sync_queue
(
cfqd
->
queue
);
}
static
void
cfq_put_cfqd
(
struct
cfq_data
*
cfqd
)
{
if
(
!
atomic_dec_and_test
(
&
cfqd
->
ref
))
return
;
cfq_shutdown_timer_wq
(
cfqd
);
mempool_destroy
(
cfqd
->
crq_pool
);
kfree
(
cfqd
->
crq_hash
);
kfree
(
cfqd
->
cfq_hash
);
kfree
(
cfqd
);
}
static
void
cfq_exit_queue
(
elevator_t
*
e
)
{
struct
cfq_data
*
cfqd
=
e
->
elevator_data
;
...
...
@@ -2184,7 +2166,13 @@ static void cfq_exit_queue(elevator_t *e)
}
spin_unlock_irq
(
q
->
queue_lock
);
write_unlock
(
&
cfq_exit_lock
);
cfq_put_cfqd
(
cfqd
);
cfq_shutdown_timer_wq
(
cfqd
);
mempool_destroy
(
cfqd
->
crq_pool
);
kfree
(
cfqd
->
crq_hash
);
kfree
(
cfqd
->
cfq_hash
);
kfree
(
cfqd
);
}
static
int
cfq_init_queue
(
request_queue_t
*
q
,
elevator_t
*
e
)
...
...
@@ -2241,8 +2229,6 @@ static int cfq_init_queue(request_queue_t *q, elevator_t *e)
INIT_WORK
(
&
cfqd
->
unplug_work
,
cfq_kick_queue
,
q
);
atomic_set
(
&
cfqd
->
ref
,
1
);
cfqd
->
cfq_queued
=
cfq_queued
;
cfqd
->
cfq_quantum
=
cfq_quantum
;
cfqd
->
cfq_fifo_expire
[
0
]
=
cfq_fifo_expire
[
0
];
...
...
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