public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
To: linux-ext4@vger.kernel.org
Subject: Re: patch queue update
Date: Fri, 11 Jan 2008 09:39:14 +0530	[thread overview]
Message-ID: <20080111040914.GA6959@skywalker> (raw)
In-Reply-To: <20080110214323.GL3351@webber.adilger.int>

On Thu, Jan 10, 2008 at 02:43:23PM -0700, Andreas Dilger wrote:
> On Jan 10, 2008  21:03 +0530, Aneesh Kumar K.V wrote:
> >  	if (i >= sbi->s_mb_order2_reqs) {
> > -		i--;
> > -		if ((ac->ac_g_ex.fe_len & (~(1 << i))) == 0)
> > +		/*
> > +		 * This should tell if fe_len is exactly power of 2
> > +		 */
> > +		if ((ac->ac_g_ex.fe_len & (~(1 << (i - 1)))) == 0)
> >  			ac->ac_2order = i;
> 
> While you changed i to (i - 1) in the "if" you didn't change it when
> setting ac_2order...  Is that incorrect?

Yes that ac_2order should be i - 1;
Will fix it in the next update.

I see that the patch queue update doesn't have most of the changes I
have placed at http://www.radian.org/~kvaneesh/ext4/jan-10-2008-ver2/

> 
> >  		/*
> > +		 * Yield the CPU here so that we don't get soft lockup
> >  		 */
> > -		schedule_timeout(HZ);
> > +		schedule();
> >  		goto repeat;
> >  	}
> >  
> > @@ -3808,7 +3820,7 @@ repeat:
> >  			printk(KERN_ERR "uh-oh! used pa while discarding\n");
> >  			dump_stack();
> >  			current->state = TASK_UNINTERRUPTIBLE;
> > -			schedule();
> > +			schedule_timeout(HZ);
> >  			goto repeat;
> 
> Is this change to schedule_timeout() intentional?  The earlier code is
> removing the use of schedule_timeout.  I could be wrong, as I didn't
> follow this discussion closely, but sometimes changes like this happen
> accidentally and people don't look at the patch itself...


The patch queue had it modified from schedule_timeout to schedule(). I
am moving it back to the original version. If we have set the task state
to TASK_UNINTERRUPTIBLE it should be schedule_timeout. And at these
place we intent to wait uninterrupted for 1 sec. The place where we
wanted to just yield is ext4_mb_discard_group_preallocations.


> > +static unsigned long ext4_get_stripe_size(struct ext4_sb_info *sbi)
> > +{
> > +	unsigned long stride = le16_to_cpu(sbi->s_es->s_raid_stride);
> > +	unsigned long stripe_width = le32_to_cpu(sbi->s_es->s_raid_stripe_width);
> > +
> > +	if (sbi->s_stripe && sbi->s_stripe <= sbi->s_blocks_per_group) {
> > +		return sbi->s_stripe;
> > +	} else if (stripe_width <= sbi->s_blocks_per_group) {
> > +		return stripe_width;
> > +	} else if (stride <= sbi->s_blocks_per_group) {
> > +		return stride;
> > +	}
> 
> If you are doing "return XXX" you don't need "else".
> 
> > +	/*
> > +	 * set the stripe size. If we have specified it via mount option, then
> > +	 * use the mount option value. If the value specified at mount time is
> > +	 * greater than the blocks per group use the super block value.
> > +	 * Allocator needs it be less than blocks per group.
> > +	 */
> > +	sbi->s_stripe = ext4_get_stripe_size(sbi);
> 
> This comment should probably go by ext4_get_stripe_size() definition instead
> of here at the caller.

Will move that to the function definition.

-aneesh

  reply	other threads:[~2008-01-11  4:09 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-10 15:33 patch queue update Aneesh Kumar K.V
2008-01-10 21:43 ` Andreas Dilger
2008-01-11  4:09   ` Aneesh Kumar K.V [this message]
  -- strict thread matches above, loose matches on Subject: below --
2008-06-15 17:21 Patch " Aneesh Kumar K.V
2008-06-16 17:49 ` Aneesh Kumar K.V
2008-06-16 22:03   ` Mingming
2008-01-24 14:50 Aneesh Kumar K.V
2008-01-24 16:26 ` Andreas Dilger
2008-01-24 16:32   ` Eric Sandeen
2008-01-24 19:50 ` Mingming Cao
2007-12-24  6:30 Aneesh Kumar K.V

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=20080111040914.GA6959@skywalker \
    --to=aneesh.kumar@linux.vnet.ibm.com \
    --cc=linux-ext4@vger.kernel.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