From: Andrew Morton <akpm@digeo.com>
To: "Martin J. Bligh" <mbligh@aracnet.com>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: 2.5.70-mm1
Date: Thu, 29 May 2003 14:14:05 -0700 [thread overview]
Message-ID: <20030529141405.4578b72c.akpm@digeo.com> (raw)
In-Reply-To: <39810000.1054240214@[10.10.2.4]>
"Martin J. Bligh" <mbligh@aracnet.com> wrote:
>
> > OK, a 10x improvement isn't too bad. I'm hoping the gap between ext2 and
> > ext3 is mainly idle time and not spinning-on-locks time.
> >
> >
> >>
> >> 2024927 267.3% total
> >> 1677960 472.8% default_idle
> >> 116350 0.0% .text.lock.transaction
> >> 42783 0.0% do_get_write_access
> >> 40293 0.0% journal_dirty_metadata
> >> 34251 6414.0% __down
> >> 27867 9166.8% .text.lock.attr
> >
> > Bah. In inode_setattr(), move the mark_inode_dirty() outside
> > lock_kernel().
>
> OK, will do.
Actually we can just ditch it.
diff -puN fs/attr.c~inode_setattr-speedup fs/attr.c
--- 25/fs/attr.c~inode_setattr-speedup Thu May 29 14:01:54 2003
+++ 25-akpm/fs/attr.c Thu May 29 14:07:57 2003
@@ -81,7 +81,6 @@ int inode_setattr(struct inode * inode,
}
}
- lock_kernel();
if (ia_valid & ATTR_UID)
inode->i_uid = attr->ia_uid;
if (ia_valid & ATTR_GID)
@@ -93,12 +92,13 @@ int inode_setattr(struct inode * inode,
if (ia_valid & ATTR_CTIME)
inode->i_ctime = attr->ia_ctime;
if (ia_valid & ATTR_MODE) {
- inode->i_mode = attr->ia_mode;
+ umode_t mode = attr->ia_mode;
+
if (!in_group_p(inode->i_gid) && !capable(CAP_FSETID))
- inode->i_mode &= ~S_ISGID;
+ mode &= ~S_ISGID;
+ inode->i_mode = mode;
}
mark_inode_dirty(inode);
- unlock_kernel();
out:
return error;
}
> >> 20016 2619.9% __wake_up
> >> 19632 927.4% schedule
> >> 12204 0.0% .text.lock.sched
> >> 12128 0.0% start_this_handle
> >> 10011 0.0% journal_add_journal_head
> >
> > hm, lots of context switches still.
>
> I think that's ext3 busily kicking the living crap out of semaphores ;-)
But I deleted them all!. Well. There is one semaphore left in ext3/jbd,
and that is for serialisation around the oh-shit-we're-out-of-space
checkpointing code. I shall go on a hat diet if that is being a problem.
hmm, very odd.
You could try my "find out who's doing down() too much" patch:
diff -puN arch/i386/kernel/semaphore.c~down-diag arch/i386/kernel/semaphore.c
--- 25/arch/i386/kernel/semaphore.c~down-diag Thu May 29 14:11:46 2003
+++ 25-akpm/arch/i386/kernel/semaphore.c Thu May 29 14:12:18 2003
@@ -66,6 +66,7 @@ void __down(struct semaphore * sem)
sem->sleepers++;
for (;;) {
int sleepers = sem->sleepers;
+ static int count;
/*
* Add "everybody else" into it. They aren't
@@ -79,6 +80,10 @@ void __down(struct semaphore * sem)
sem->sleepers = 1; /* us - see -1 above */
spin_unlock_irqrestore(&sem->wait.lock, flags);
+ if (count++ > 100000) {
+ count = 0;
+ dump_stack();
+ }
schedule();
spin_lock_irqsave(&sem->wait.lock, flags);
_
next prev parent reply other threads:[~2003-05-29 21:04 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-27 7:42 2.5.70-mm1 Andrew Morton
2003-05-27 10:38 ` 2.5.70-mm1 Marc-Christian Petersen
2003-05-27 20:33 ` 2.5.70-mm1 Ed Tomlinson
2003-05-27 20:49 ` 2.5.70-mm1 Andrew Morton
2003-05-27 23:05 ` 2.5.70-mm1 Ed Tomlinson
2003-05-28 17:10 ` 2.5.70-mm1 Mingming Cao
2003-05-28 19:44 ` 2.5.70-mm1 Andrew Morton
2003-05-29 6:23 ` 2.5.70-mm1 Martin J. Bligh
2003-05-29 18:40 ` 2.5.70-mm1 Martin J. Bligh
2003-05-29 18:52 ` 2.5.70-mm1 Andrew Morton
2003-05-29 20:30 ` 2.5.70-mm1 Martin J. Bligh
2003-05-29 21:14 ` Andrew Morton [this message]
2003-05-30 15:51 ` 2.5.70-mm1 Martin J. Bligh
2003-05-30 16:43 ` 2.5.70-mm1 Andrew Morton
2003-05-30 23:51 ` 2.5.70-mm1 Martin J. Bligh
2003-06-03 6:34 ` ext3 semaphore tracing Martin J. Bligh
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=20030529141405.4578b72c.akpm@digeo.com \
--to=akpm@digeo.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mbligh@aracnet.com \
/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;
as well as URLs for NNTP newsgroup(s).