From: Andrew Morton <akpm@digeo.com>
To: Ed Tomlinson <tomlins@cam.org>
Cc: lkml <linux-kernel@vger.kernel.org>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
Ingo Molnar <mingo@elte.hu>
Subject: Re: 2.5.39-mm1
Date: Sun, 29 Sep 2002 18:35:46 -0700 [thread overview]
Message-ID: <3D97AA72.ED585E24@digeo.com> (raw)
In-Reply-To: <200209292124.12696.tomlins@cam.org>
Ed Tomlinson wrote:
>
> On September 29, 2002 04:26 pm, Andrew Morton wrote:
> > There is a reiserfs compilation problem at present.
>
> make[2]: Entering directory `/poole/src/39-mm1/fs/reiserfs'
> gcc -Wp,-MD,./.bitmap.o.d -D__KERNEL__ -I/poole/src/39-mm1/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -march=k6 -I/poole/src/39-mm1/arch/i386/mach-generic -nostdinc -iwithprefix include -DKBUILD_BASENAME=bitmap -c -o bitmap.o bitmap.c
> In file included from bitmap.c:8:
> /poole/src/39-mm1/include/linux/reiserfs_fs.h:1635: parse error before `reiserfs_commit_thread_tq'
Ingo sent me the below temp fix. I let it out because it's
probably better to leave the fs broken until we have a firm,
tested solution.
--- linux/drivers/char/drm/radeon_irq.c.orig Sun Sep 29 20:55:34 2002
+++ linux/drivers/char/drm/radeon_irq.c Sun Sep 29 20:56:27 2002
@@ -69,8 +69,7 @@
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);
--- linux/fs/reiserfs/journal.c.orig Sun Sep 29 21:03:48 2002
+++ linux/fs/reiserfs/journal.c Sun Sep 29 21:04:49 2002
@@ -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 @@
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 @@
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 @@
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 @@
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 @@
}
}
-/*
-** 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(¤t->sigmask_lock);
- sigfillset(¤t->blocked);
- recalc_sigpending();
- spin_unlock_irq(¤t->sigmask_lock);
-
- 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 @@
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 ;
}
--- linux/include/linux/reiserfs_fs.h.orig Sun Sep 29 20:58:23 2002
+++ linux/include/linux/reiserfs_fs.h Sun Sep 29 20:58:30 2002
@@ -1632,9 +1632,6 @@
/* 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) */
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/
next prev parent reply other threads:[~2002-09-30 1:35 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-29 20:26 2.5.39-mm1 Andrew Morton
2002-09-30 1:24 ` 2.5.39-mm1 Ed Tomlinson
2002-09-30 1:35 ` Andrew Morton [this message]
2002-09-30 7:51 ` 2.5.39-mm1 Martin J. Bligh
2002-09-30 8:01 ` 2.5.39-mm1 Andrew Morton
2002-09-30 16:29 ` 2.5.39-mm1 Martin J. Bligh
2002-09-30 18:24 ` 2.5.39-mm1 Andrew Morton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3D97AA72.ED585E24@digeo.com \
--to=akpm@digeo.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mingo@elte.hu \
--cc=tomlins@cam.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox