Skip to contentSkip to conversation

ext4/jbd2: remove stray markers

PATCH In review Christoph Hellwig 3 participants 10 messages May 6, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ext4/jbd2: remove stray markers

ext4/jbd2 has a couple of stray markers without any users introduced in commit ba80b1019aa722b24506db1ee755e0bb2f513022 (which has a very useless changelog, btw). Remove them in preparation of removing the markers in favour of the TRACE_EVENT macro (and also because we don't keep dead code around).

Ted, I think you have some TRAVE_EVENT patches for ext4 pending, but is it okay to queue up this removal in the tracing tree? That way we can remove the markers leftovers there completely as soon as the 2.6.31 merge window opens.

fs/ext4/fsync.c +0 -4
Index: linux-2.6-tip/fs/ext4/fsync.c
===================================================================
@@ -52,10 +52,6 @@
 
 	J_ASSERT(ext4_journal_current_handle() == NULL);
 
-	trace_mark(ext4_sync_file, "dev %s datasync %d ino %ld parent %ld",
-		   inode->i_sb->s_id, datasync, inode->i_ino,
-		   dentry->d_parent->d_inode->i_ino);
-
 	/*
 	 * data=writeback:
 	 *  The caller's filemap_fdatawrite()/wait will sync the data.
fs/ext4/ialloc.c +0 -9
Index: linux-2.6-tip/fs/ext4/ialloc.c
===================================================================
@@ -209,11 +209,6 @@
 
 	ino = inode->i_ino;
 	ext4_debug("freeing inode %lu\n", ino);
-	trace_mark(ext4_free_inode,
-		   "dev %s ino %lu mode %d uid %lu gid %lu bocks %llu",
-		   sb->s_id, inode->i_ino, inode->i_mode,
-		   (unsigned long) inode->i_uid, (unsigned long) inode->i_gid,
-		   (unsigned long long) inode->i_blocks);
 
 	/*
 	 * Note: we must free any quota before locking the superblock,
@@ -817,8 +812,6 @@
 		return ERR_PTR(-EPERM);
 
 	sb = dir->i_sb;
-	trace_mark(ext4_request_inode, "dev %s dir %lu mode %d", sb->s_id,
-		   dir->i_ino, mode);
 	inode = new_inode(sb);
 	if (!inode)
 		return ERR_PTR(-ENOMEM);
@@ -1050,8 +1043,6 @@
 	}
 
 	ext4_debug("allocating inode %lu\n", inode->i_ino);
-	trace_mark(ext4_allocate_inode, "dev %s ino %lu dir %lu mode %d",
-		   sb->s_id, inode->i_ino, dir->i_ino, mode);
 	goto really_out;
 fail:
 	ext4_std_error(sb, err);
fs/ext4/inode.c +0 -55

121 lines not on this page · raw message

fs/ext4/mballoc.c +0 -48

108 lines not on this page · raw message

fs/ext4/super.c +0 -1
Index: linux-2.6-tip/fs/ext4/super.c
===================================================================
@@ -3287,7 +3287,6 @@
 	int ret = 0;
 	tid_t target;
 
-	trace_mark(ext4_sync_fs, "dev %s wait %d", sb->s_id, wait);
 	sb->s_dirt = 0;
 	if (EXT4_SB(sb)->s_journal) {
 		if (jbd2_journal_start_commit(EXT4_SB(sb)->s_journal,
fs/jbd2/checkpoint.c +0 -2
Index: linux-2.6-tip/fs/jbd2/checkpoint.c
===================================================================
@@ -358,8 +358,6 @@
 	 * journal straight away.
 	 */
 	result = jbd2_cleanup_journal_tail(journal);
-	trace_mark(jbd2_checkpoint, "dev %s need_checkpoint %d",
-		   journal->j_devname, result);
 	jbd_debug(1, "cleanup_journal_tail returned %d\n", result);
 	if (result <= 0)
 		return result;
fs/jbd2/commit.c +0 -5
Index: linux-2.6-tip/fs/jbd2/commit.c
===================================================================
@@ -394,8 +394,6 @@
 	commit_transaction = journal->j_running_transaction;
 	J_ASSERT(commit_transaction->t_state == T_RUNNING);
 
-	trace_mark(jbd2_start_commit, "dev %s transaction %d",
-		   journal->j_devname, commit_transaction->t_tid);
 	jbd_debug(1, "JBD: starting commit of transaction %d\n",
 			commit_transaction->t_tid);
 
@@ -1053,9 +1051,6 @@
 	if (journal->j_commit_callback)
 		journal->j_commit_callback(journal, commit_transaction);
 
-	trace_mark(jbd2_end_commit, "dev %s transaction %d head %d",
-		   journal->j_devname, commit_transaction->t_tid,
-		   journal->j_tail_sequence);
 	jbd_debug(1, "JBD: commit %d complete, head %d\n",
 		  journal->j_commit_sequence, journal->j_tail_sequence);
 	if (to_free)
#1 lore raw
Quoted 10 lines · Christoph Hellwig

ext4/jbd2 has a couple of stray markers without any users introduced in commit ba80b1019aa722b24506db1ee755e0bb2f513022 (which has a very useless changelog, btw). Remove them in preparation of removing the markers in favour of the TRACE_EVENT macro (and also because we don't keep dead code around).

Ted, I think you have some TRAVE_EVENT patches for ext4 pending, but is it okay to queue up this removal in the tracing tree? That way we can remove the markers leftovers there completely as soon as the 2.6.31 merge window opens.

i think these markers are still in active use, so i'd not remove them before Ted's TRACE_EVENT() changes are included. We can/should do that in a single topic - in a work flow that suits Ted best.

We can do a -git based special-purpose topic branch in -tip, or we can do it in tip/tracing, or we can pull a (-git based) branch from Ted. Or we can delay it all to the v2.6.31 merge window. Ted's choice.

Ingo

#2 lore raw
Quoted 1 line · Ingo Molnar

i think these markers are still in active use,

It's trivially proveable by grep that there is real no user. (modulo ad-hoc out of tree modules, which we've never cared about retaining stuff)

The workflow question is the real one, that's why I can only do it if Ted is okay with it.

#3 lore raw
Quoted 6 lines · Christoph Hellwig
Quoted 1 line · Ingo Molnar

i think these markers are still in active use,

It's trivially proveable by grep that there is real no user. (modulo ad-hoc out of tree modules, which we've never cared about retaining stuff)

Well, i'll defer to Ted about whether those out of tree uses are relevant to ext4. It's not a problem to do this all in a polite way, without destroying functionality.

Ingo

maintainer
#4 lore raw
In reply to Ingo Molnar
Quoted 9 lines · Ingo Molnar
Quoted 5 lines

Ted, I think you have some TRAVE_EVENT patches for ext4 pending, but is it okay to queue up this removal in the tracing tree? That way we can remove the markers leftovers there completely as soon as the 2.6.31 merge window opens.

i think these markers are still in active use, so i'd not remove them before Ted's TRACE_EVENT() changes are included. We can/should do that in a single topic - in a work flow that suits Ted best.

My complaint with Cristoph's is that it will conflict with patches I have pending which replaces the markers with tracepoints --- and I *am* using the tracepoints actively. The only reason why these patches aren't in -stable is they have a dependency one of Rostedt's changes. (Not a syntactic dependency, but if we merge in the wrong order, and the rcu_read_lock/unlock() calls aren't around the TP_PRINTK callpoint, then in certain CONFIG_PREEMPT configurations and if there is more than one active ext4 filesystem while the ext4 or jbd2 tracepoints are active, there's a potential race.)

Quoted 4 lines

We can do a -git based special-purpose topic branch in -tip, or we can do it in tip/tracing, or we can pull a (-git based) branch from Ted. Or we can delay it all to the v2.6.31 merge window. Ted's choice.

My plan was to wait for the tracing patches to get pushed during the 2.6.31 merge tree, at which point I would then push my changes which replace the markers with TRACE_EVENT changes. So no matter which way we do this, the ext4 markers will be gone by the end of the 2.6.31 merge window.

Christoph, if you have some desire to completely remove the CONFIG_MARKERS support code, and I'm holding up your ability to do work, I can take the ext4 TRACE_EVENT patches, and queue them up in tip/tracing. It's less work than if we take your markers removal patches, since then I would have to resolve all of the conflicts with my patches which replace all of the ext4 and jbd2 markers with TRACE_EVENTS macros.

My preference is for the former, mainly because my patches are already set up for that, and I'm a lazy bastard; the latter wouldn't be much work, though. I'm guessing your preference would be for the latter?

- Ted

#5 lore raw
Quoted 1 line · Theodore Tso

My complaint with Cristoph's

Christoph, still :)

Quoted 9 lines

is that it will conflict with patches I
have pending which replaces the markers with tracepoints --- and I *am* using the tracepoints actively. The only reason why these patches aren't in -stable is they have a dependency one of Rostedt's changes. (Not a syntactic dependency, but if we merge in the wrong order, and the rcu_read_lock/unlock() calls aren't around the TP_PRINTK callpoint, then in certain CONFIG_PREEMPT configurations and if there is more than one active ext4 filesystem while the ext4 or jbd2 tracepoints are active, there's a potential race.)

Also without Steve's updates you can't actually use them in a module.

Quoted 6 lines

My plan was to wait for the tracing patches to get pushed during the 2.6.31 merge tree, at which point I would then push my changes which replace the markers with TRACE_EVENT changes. So no matter which way we do this, the ext4 markers will be gone by the end of the 2.6.31 merge window.

Quoted 7 lines

Christoph, if you have some desire to completely remove the CONFIG_MARKERS support code, and I'm holding up your ability to do work, I can take the ext4 TRACE_EVENT patches, and queue them up in tip/tracing. It's less work than if we take your markers removal patches, since then I would have to resolve all of the conflicts with my patches which replace all of the ext4 and jbd2 markers with TRACE_EVENTS macros.

I was planning to do make sure it's all gone. Once we are into the 2.6.31 merge dinwo I fear that the final patches will miss the window due to all these interdependencies. But Ingo didn't seem to be too interested in taking the other patches that would be required for it, so I guess I'll try to somehow get it done in the merge window and otherwise we'll have to wait for 2.6.32.

#9 lore raw
In reply to Theodore Tso
Quoted 11 lines · Theodore Tso
Quoted 9 lines · Ingo Molnar
Quoted 5 lines

Ted, I think you have some TRAVE_EVENT patches for ext4 pending, but is it okay to queue up this removal in the tracing tree? That way we can remove the markers leftovers there completely as soon as the 2.6.31 merge window opens.

i think these markers are still in active use, so i'd not remove them before Ted's TRACE_EVENT() changes are included. We can/should do that in a single topic - in a work flow that suits Ted best.

Quoted 10 lines

My complaint with Cristoph's is that it will conflict with patches I have pending which replaces the markers with tracepoints --- and I *am* using the tracepoints actively. The only reason why these patches aren't in -stable is they have a dependency one of Rostedt's changes. (Not a syntactic dependency, but if we merge in the wrong order, and the rcu_read_lock/unlock() calls aren't around the TP_PRINTK callpoint, then in certain CONFIG_PREEMPT configurations and if there is more than one active ext4 filesystem while the ext4 or jbd2 tracepoints are active, there's a potential race.)

That's OK.

Quoted 10 lines
Quoted 4 lines

We can do a -git based special-purpose topic branch in -tip, or we can do it in tip/tracing, or we can pull a (-git based) branch from Ted. Or we can delay it all to the v2.6.31 merge window. Ted's choice.

My plan was to wait for the tracing patches to get pushed during the 2.6.31 merge tree, at which point I would then push my changes which replace the markers with TRACE_EVENT changes. So no matter which way we do this, the ext4 markers will be gone by the end of the 2.6.31 merge window.

That's a perfectly fine approach.

Quoted 8 lines

Christoph, if you have some desire to completely remove the CONFIG_MARKERS support code, and I'm holding up your ability to do work, I can take the ext4 TRACE_EVENT patches, and queue them up in tip/tracing. It's less work than if we take your markers removal patches, since then I would have to resolve all of the conflicts with my patches which replace all of the ext4 and jbd2 markers with TRACE_EVENTS macros.

Quoted 4 lines

My preference is for the former, mainly because my patches are already set up for that, and I'm a lazy bastard; the latter wouldn't be much work, though. I'm guessing your preference would be for the latter?

No, lets delay this to the v2.6.31 merge window. I'd like to remove markers - but not at the cost of making life harder for others and at the cost of creating inter-dependencies on such a level.

I objected to markers back when they were merged in a rather haphazard way, but i'll object to any haphazard removal just as much ;-) The .31 merge window will open in about a month.

Ingo

#6 lore raw
In reply to Christoph Hellwig
Quoted 6 lines · Christoph Hellwig

I was planning to do make sure it's all gone. Once we are into the 2.6.31 merge dinwo I fear that the final patches will miss the window due to all these interdependencies. But Ingo didn't seem to be too interested in taking the other patches that would be required for it, so I guess I'll try to somehow get it done in the merge window and otherwise we'll have to wait for 2.6.32.

Well, while coupling to lots of subsystems is natural for something as intrinsic as the tracing tree - still i dont want to over-do it. In little over a month these patches can go into their local subsystem trees, without any interactions with anything.

So the patches you did are nice - just (as it is usual with any core kernel tree) the logistics have to be planned carefully.

Ingo

maintainer
#7 lore raw
In reply to Christoph Hellwig
Quoted 4 lines · Christoph Hellwig
Quoted 1 line · Theodore Tso

My complaint with Cristoph's

Christoph, still :)

Sorry, I keep making that mistake! Keep calling me on it, and eventually I'll reprogram those finger macros. :-)

Quoted 1 line

Also without Steve's updates you can't actually use them in a module.

Yep; not sure *how* critical that would be for -next, though. Probably there would be some complaints....

In any case, it'll be less work to worry about patch conflicts if we just do it during the merge window. If we can just arrange to push the tip/tracing changes early, I'll push the marker replacement patches as soon as I see them hit mainline.

Regards,

- Ted

#8 lore raw
Quoted 12 lines · Theodore Tso
Quoted 4 lines · Christoph Hellwig
Quoted 1 line · Theodore Tso

My complaint with Cristoph's

Christoph, still :)

Sorry, I keep making that mistake! Keep calling me on it, and eventually I'll reprogram those finger macros. :-)

Quoted 1 line

Also without Steve's updates you can't actually use them in a module.

Quoted 7 lines

Yep; not sure *how* critical that would be for -next, though. Probably there would be some complaints....

In any case, it'll be less work to worry about patch conflicts if we just do it during the merge window. If we can just arrange to push the tip/tracing changes early, I'll push the marker replacement patches as soon as I see them hit mainline.

Cool, thanks! I'll try to aim for an early merge of the tracing tree. (And such dependent patches are generally possible shortly after -rc1 as well, especially if the clean-up factor is significant.)

Ingo