netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: FUJITA Tomonori <tomof@acm.org>
To: akpm@linux-foundation.org
Cc: just.for.lkml@googlemail.com, jarkao2@gmail.com,
	herbert@gondor.apana.org.au, linux-kernel@vger.kernel.org,
	neilb@suse.de, bfields@fieldses.org, netdev@vger.kernel.org,
	tom@opengridcomputing.com, tomof@acm.org
Cc: fujita.tomonori@lab.ntt.co.jp
Subject: Re: 2.6.24-rc6-mm1
Date: Sun, 6 Jan 2008 12:28:00 +0900	[thread overview]
Message-ID: <20080106123103K.tomof@acm.org> (raw)
In-Reply-To: <20080105172524.fecb63bf.akpm@linux-foundation.org>

On Sat, 5 Jan 2008 17:25:24 -0800
Andrew Morton <akpm@linux-foundation.org> wrote:

> On Sat, 5 Jan 2008 23:10:17 +0100 "Torsten Kaiser" <just.for.lkml@googlemail.com> wrote:
> 
> > On Jan 5, 2008 3:52 PM, Torsten Kaiser <just.for.lkml@googlemail.com> wrote:
> > > On Jan 5, 2008 11:13 AM, Jarek Poplawski <jarkao2@gmail.com> wrote:
> > > > On Sat, Jan 05, 2008 at 09:01:02AM +0100, Torsten Kaiser wrote:
> > > > > On Jan 5, 2008 1:07 AM, Jarek Poplawski <jarkao2@gmail.com> wrote:
> > > > > > I think it would be easier just to start with this working -rc6 and
> > > > > > simply check if we have 'right' suspects, so: git-net.patch and
> > > > > > git-nfsd.patch from -mm1-broken-out, as suggested by Herbert (I hope,
> > > > > > can compile - otherwise you could try the other way: add the whole -mm
> > > > > > and revert these two). Using current gits could complicate this
> > > > > > "investigation".
> > > > >
> > > > > OK, I will try this...
> > >
> > > still on the todo-list, I had no time to try this yet...
> > 
> > working on it...
> > 2.6.24-rc6 + mm-patches up to git.battery (includes git-net and
> > git-netdev-all) worked for 110 packages, then I proclaimed it good.
> > 2.6.24-rc6 + mm-patches up to (including) git.nfsd is currently
> > getting testet (9 packages done...)
> > 
> > But the cause of my mail is the following question:
> > Regarding my "iommu-sg-merging-patches are new in -rc3-mm and could be
> > the cause"-suspicion I looked at these patches and came across these
> > hunks:
> > 
> > This is removed from arch/x86/lib/bitstr_64.c:
> > -/* Find string of zero bits in a bitmap */
> > -unsigned long
> > -find_next_zero_string(unsigned long *bitmap, long start, long nbits, int len)
> > -{
> > -       unsigned long n, end, i;
> > -
> > - again:
> > -       n = find_next_zero_bit(bitmap, nbits, start);
> > -       if (n == -1)
> > -               return -1;
> > -
> > -       /* could test bitsliced, but it's hardly worth it */
> > -       end = n+len;
> > -       if (end > nbits)
> > -               return -1;
> > -       for (i = n+1; i < end; i++) {
> > -               if (test_bit(i, bitmap)) {
> > -                       start = i+1;
> > -                       goto again;
> > -               }
> > -       }
> > -       return n;
> > -}
> > 
> > This is added to lib/iommu-helper.c:
> > +static unsigned long find_next_zero_area(unsigned long *map,
> > +                                        unsigned long size,
> > +                                        unsigned long start,
> > +                                        unsigned int nr)
> > +{
> > +       unsigned long index, end, i;
> > +again:
> > +       index = find_next_zero_bit(map, size, start);
> > +       end = index + nr;
> > +       if (end > size)
> > +               return -1;
> > +       for (i = index + 1; i < end; i++) {
> > +               if (test_bit(i, map)) {
> > +                       start = i+1;
> > +                       goto again;
> > +               }
> > +       }
> > +       return index;
> > +}
> > 
> > The old version checks, if find_next_zero_bit returns -1, the new
> > version doesn't do this.
> > Is this intended and can find_next_zero_bit never fail?
> > Hmm... but in the worst case it should only loop forever if I'm
> > reading this right (index = -1 => for-loop counts from 0 to nr, if any
> > bit is set it will jump to "again:" and if the next call to
> > find_next_zero_bit also fails, its an endless loop)

find_next_zero_bit returns -1?

It seems that x86_64 doesn't. POWER and SPARC64 IOMMUs use
find_next_zero_bit too but both doesn't check if find_next_zero_bit
returns -1. If find_next_zero_bit fails, it returns size. So it
doesn't leads to an endless loop.

But this patch has other bugs that break POWER IOMMUs.

If you use the IOMMUs on POWER, please try the following patch:

http://www.mail-archive.com/linux-scsi@vger.kernel.org/msg12702.html

> 
> I susect these are doing different things. 
> iommu-sg-kill-__clear_bit_string-and-find_next_zero_string.patch says:
> 
>   This kills unused __clear_bit_string and find_next_zero_string (they
>   were used by only gart and calgary IOMMUs).
> 
> iommu-sg-add-iommu-helper-functions-for-the-free-area-management.patch says:
> 
>   This adds IOMMU helper functions for the free area management.  These
>   functions take care of LLD's segment boundary limit for IOMMUs.  They
>   would be useful for IOMMUs that use bitmap for the free area management.
> 
> > So even if this can not explain my bug, could somebody check if this
> > is a real bug or not?
> 
> Let's cc the author of those changes.
> 
> Thanks for persisting with this bug.

  reply	other threads:[~2008-01-06  3:28 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20071222233056.d652743e.akpm@linux-foundation.org>
     [not found] ` <64bb37e0712230827m7d368e2l3174f3b4396d09c1@mail.gmail.com>
     [not found]   ` <64bb37e0712281453y4aac82b7h7acc8ec314ca6e3e@mail.gmail.com>
2007-12-28 23:07     ` 2.6.24-rc6-mm1 Andrew Morton
2007-12-29 16:51       ` 2.6.24-rc6-mm1 Torsten Kaiser
2007-12-30  1:30         ` 2.6.24-rc6-mm1 Herbert Xu
2007-12-30  3:34           ` 2.6.24-rc6-mm1 Torsten Kaiser
2007-12-30  5:41             ` 2.6.24-rc6-mm1 Randy Dunlap
2007-12-31 20:15             ` 2.6.24-rc6-mm1 Torsten Kaiser
2008-01-01 12:04               ` 2.6.24-rc6-mm1 Herbert Xu
2008-01-01 12:59                 ` 2.6.24-rc6-mm1 Torsten Kaiser
2008-01-01 18:29                   ` 2.6.24-rc6-mm1 Torsten Kaiser
2008-01-02 18:29                 ` 2.6.24-rc6-mm1 Torsten Kaiser
2008-01-02 21:51                   ` 2.6.24-rc6-mm1 Herbert Xu
2008-01-02 21:57                     ` 2.6.24-rc6-mm1 J. Bruce Fields
2008-01-03  5:02                       ` 2.6.24-rc6-mm1 Torsten Kaiser
2008-01-03 15:37                       ` 2.6.24-rc6-mm1 Torsten Kaiser
2008-01-03 18:52                         ` 2.6.24-rc6-mm1 J. Bruce Fields
2008-01-04 10:23                     ` 2.6.24-rc6-mm1 Torsten Kaiser
2008-01-04 13:30                       ` 2.6.24-rc6-mm1 Jarek Poplawski
2008-01-04 15:21                         ` 2.6.24-rc6-mm1 Torsten Kaiser
2008-01-04 21:24                           ` 2.6.24-rc6-mm1 Torsten Kaiser
2008-01-05  0:07                           ` 2.6.24-rc6-mm1 Jarek Poplawski
2008-01-05  8:01                             ` 2.6.24-rc6-mm1 Torsten Kaiser
2008-01-05 10:13                               ` 2.6.24-rc6-mm1 Jarek Poplawski
2008-01-05 14:52                                 ` 2.6.24-rc6-mm1 Torsten Kaiser
2008-01-05 22:10                                   ` 2.6.24-rc6-mm1 Torsten Kaiser
2008-01-06  1:25                                     ` 2.6.24-rc6-mm1 Andrew Morton
2008-01-06  3:28                                       ` FUJITA Tomonori [this message]
2008-01-06 10:41                                         ` 2.6.24-rc6-mm1 Torsten Kaiser
2008-01-06 11:23                                           ` 2.6.24-rc6-mm1 FUJITA Tomonori
2008-01-06 11:35                                             ` 2.6.24-rc6-mm1 Torsten Kaiser
2008-01-06 13:33                                               ` 2.6.24-rc6-mm1 FUJITA Tomonori
2008-01-06 20:03                                                 ` 2.6.24-rc6-mm1 Torsten Kaiser
2008-01-07  6:16                                                   ` 2.6.24-rc6-mm1 FUJITA Tomonori
2008-01-08 15:59                                                     ` 2.6.24-rc6-mm1 Ingo Molnar
2008-01-08 23:57                                                       ` 2.6.24-rc6-mm1 FUJITA Tomonori
2008-01-09  0:27                                                         ` 2.6.24-rc6-mm1 Andrew Morton
2008-01-09  0:54                                                           ` 2.6.24-rc6-mm1 FUJITA Tomonori
2008-01-09  1:07                                                             ` 2.6.24-rc6-mm1 Andrew Morton
2008-01-09  9:04                                                         ` 2.6.24-rc6-mm1 Jarek Poplawski
2008-01-10  0:54                                                           ` 2.6.24-rc6-mm1 FUJITA Tomonori
2008-01-25 21:06                                                     ` 2.6.24-rc6-mm1 Torsten Kaiser
2008-01-06  3:16                                     ` 2.6.24-rc6-mm1 Torsten Kaiser
2008-01-06  8:27                                   ` 2.6.24-rc6-mm1 Jarek Poplawski
2008-01-06 10:30                                     ` 2.6.24-rc6-mm1 Torsten Kaiser
2008-01-06 14:52                                       ` 2.6.24-rc6-mm1 Jarek Poplawski
2007-12-30 21:24       ` 2.6.24-rc6-mm1 J. Bruce Fields
2007-12-30 21:35         ` 2.6.24-rc6-mm1 Torsten Kaiser
2007-12-31 13:17           ` 2.6.24-rc6-mm1 Torsten Kaiser

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=20080106123103K.tomof@acm.org \
    --to=tomof@acm.org \
    --cc=akpm@linux-foundation.org \
    --cc=bfields@fieldses.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=jarkao2@gmail.com \
    --cc=just.for.lkml@googlemail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=neilb@suse.de \
    --cc=netdev@vger.kernel.org \
    --cc=tom@opengridcomputing.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).