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
Kirill Smelkov
linux
Commits
24141f21
Commit
24141f21
authored
Sep 29, 2002
by
Ingo Molnar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] tq_struct removal fixups..
Update radeon_irq.c and reiserfs for tq simplifications
parent
387ab03b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
66 deletions
+9
-66
drivers/char/drm/radeon_irq.c
drivers/char/drm/radeon_irq.c
+1
-2
fs/reiserfs/journal.c
fs/reiserfs/journal.c
+8
-61
include/linux/reiserfs_fs.h
include/linux/reiserfs_fs.h
+0
-3
No files found.
drivers/char/drm/radeon_irq.c
View file @
24141f21
...
...
@@ -69,8 +69,7 @@ void DRM(dma_service)( DRM_IRQ_ARGS )
atomic_inc
(
&
dev_priv
->
irq_received
);
#ifdef __linux__
queue_task
(
&
dev
->
tq
,
&
tq_immediate
);
mark_bh
(
IMMEDIATE_BH
);
schedule_task
(
&
dev
->
tq
);
#endif
/* __linux__ */
#ifdef __FreeBSD__
taskqueue_enqueue
(
taskqueue_swi
,
&
dev
->
task
);
...
...
fs/reiserfs/journal.c
View file @
24141f21
...
...
@@ -65,13 +65,6 @@
*/
static
int
reiserfs_mounted_fs_count
=
0
;
/* wake this up when you add something to the commit thread task queue */
DECLARE_WAIT_QUEUE_HEAD
(
reiserfs_commit_thread_wait
)
;
/* wait on this if you need to be sure you task queue entries have been run */
static
DECLARE_WAIT_QUEUE_HEAD
(
reiserfs_commit_thread_done
)
;
DECLARE_TASK_QUEUE
(
reiserfs_commit_thread_tq
)
;
#define JOURNAL_TRANS_HALF 1018
/* must be correct to keep the desc and commit
structs at 4k */
#define BUFNR 64
/*read ahead */
...
...
@@ -1339,12 +1332,9 @@ static int do_journal_release(struct reiserfs_transaction_handle *th, struct sup
do_journal_end
(
&
myth
,
p_s_sb
,
1
,
FLUSH_ALL
)
;
}
/* we decrement before we wake up, because the commit thread dies off
** when it has been woken up and the count is <= 0
*/
reiserfs_mounted_fs_count
--
;
wake_up
(
&
reiserfs_commit_thread_wait
)
;
sleep_on
(
&
reiserfs_commit_thread_done
)
;
/* wait for all commits to finish */
flush_scheduled_tasks
()
;
release_journal_dev
(
p_s_sb
,
SB_JOURNAL
(
p_s_sb
)
);
free_journal_ram
(
p_s_sb
)
;
...
...
@@ -1815,6 +1805,10 @@ struct reiserfs_journal_commit_task {
static
void
reiserfs_journal_commit_task_func
(
struct
reiserfs_journal_commit_task
*
ct
)
{
struct
reiserfs_journal_list
*
jl
;
/* FIXMEL: is this needed? */
lock_kernel
();
jl
=
SB_JOURNAL_LIST
(
ct
->
p_s_sb
)
+
ct
->
jindex
;
flush_commit_list
(
ct
->
p_s_sb
,
SB_JOURNAL_LIST
(
ct
->
p_s_sb
)
+
ct
->
jindex
,
1
)
;
...
...
@@ -1824,6 +1818,7 @@ static void reiserfs_journal_commit_task_func(struct reiserfs_journal_commit_tas
kupdate_one_transaction
(
ct
->
p_s_sb
,
jl
)
;
}
reiserfs_kfree
(
ct
->
self
,
sizeof
(
struct
reiserfs_journal_commit_task
),
ct
->
p_s_sb
)
;
unlock_kernel
();
}
static
void
setup_commit_task_arg
(
struct
reiserfs_journal_commit_task
*
ct
,
...
...
@@ -1850,8 +1845,7 @@ static void commit_flush_async(struct super_block *p_s_sb, int jindex) {
ct
=
reiserfs_kmalloc
(
sizeof
(
struct
reiserfs_journal_commit_task
),
GFP_NOFS
,
p_s_sb
)
;
if
(
ct
)
{
setup_commit_task_arg
(
ct
,
p_s_sb
,
jindex
)
;
queue_task
(
&
(
ct
->
task
),
&
reiserfs_commit_thread_tq
);
wake_up
(
&
reiserfs_commit_thread_wait
)
;
schedule_task
(
&
ct
->
task
)
;
}
else
{
#ifdef CONFIG_REISERFS_CHECK
reiserfs_warning
(
"journal-1540: kmalloc failed, doing sync commit
\n
"
)
;
...
...
@@ -1860,49 +1854,6 @@ static void commit_flush_async(struct super_block *p_s_sb, int jindex) {
}
}
/*
** this is the commit thread. It is started with kernel_thread on
** FS mount, and journal_release() waits for it to exit.
**
** It could do a periodic commit, but there is a lot code for that
** elsewhere right now, and I only wanted to implement this little
** piece for starters.
**
** All we do here is sleep on the j_commit_thread_wait wait queue, and
** then run the per filesystem commit task queue when we wakeup.
*/
static
int
reiserfs_journal_commit_thread
(
void
*
nullp
)
{
daemonize
()
;
spin_lock_irq
(
&
current
->
sig
->
siglock
);
sigfillset
(
&
current
->
blocked
);
recalc_sigpending
();
spin_unlock_irq
(
&
current
->
sig
->
siglock
);
sprintf
(
current
->
comm
,
"kreiserfsd"
)
;
lock_kernel
()
;
while
(
1
)
{
while
(
TQ_ACTIVE
(
reiserfs_commit_thread_tq
))
{
run_task_queue
(
&
reiserfs_commit_thread_tq
)
;
}
/* if there aren't any more filesystems left, break */
if
(
reiserfs_mounted_fs_count
<=
0
)
{
run_task_queue
(
&
reiserfs_commit_thread_tq
)
;
break
;
}
wake_up
(
&
reiserfs_commit_thread_done
)
;
if
(
current
->
flags
&
PF_FREEZE
)
refrigerator
(
PF_IOTHREAD
);
interruptible_sleep_on_timeout
(
&
reiserfs_commit_thread_wait
,
5
*
HZ
)
;
}
unlock_kernel
()
;
wake_up
(
&
reiserfs_commit_thread_done
)
;
return
0
;
}
static
void
journal_list_init
(
struct
super_block
*
p_s_sb
)
{
int
i
;
for
(
i
=
0
;
i
<
JOURNAL_LIST_COUNT
;
i
++
)
{
...
...
@@ -2175,10 +2126,6 @@ int journal_init(struct super_block *p_s_sb, const char * j_dev_name, int old_fo
return
0
;
reiserfs_mounted_fs_count
++
;
if
(
reiserfs_mounted_fs_count
<=
1
)
{
kernel_thread
((
void
*
)(
void
*
)
reiserfs_journal_commit_thread
,
NULL
,
CLONE_FS
|
CLONE_FILES
|
CLONE_VM
)
;
}
return
0
;
}
...
...
include/linux/reiserfs_fs.h
View file @
24141f21
...
...
@@ -1632,9 +1632,6 @@ struct reiserfs_journal_header {
/* 12 */
struct
journal_params
jh_journal
;
}
;
extern
task_queue
reiserfs_commit_thread_tq
;
extern
wait_queue_head_t
reiserfs_commit_thread_wait
;
/* biggest tunable defines are right here */
#define JOURNAL_BLOCK_COUNT 8192
/* number of blocks in the journal */
#define JOURNAL_TRANS_MAX_DEFAULT 1024
/* biggest possible single transaction, don't change for now (8/3/99) */
...
...
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