All of lore.kernel.org
 help / color / mirror / Atom feed
* Ppcboot & kernel upgrade problem(2.4.x kernel does not work)
From: ByungGiBaek @ 2002-01-15  6:50 UTC (permalink / raw)
  To: linuxppc-embedded@lists.linuxppc.org


Dear  all,

Now I'm trying to upgrade linux kernel from 2.2.14 to 2.4.x on our own MPC860T board(50MHz).
I successfully download and boot linux-2.2.14 kernel with ppcboot-0.9.3.

But when I tried to boot linux-2.4.x kernel with same ppcboot and same board,I have some problem.
I just see under messages then the board is auto resetted.
I adjusted IMMR and bd_t of include/asm/my_board.h as ppcboot.h of ppcboot.

Thanks in advance.

=> bootm
## Booting image at 00100000 ...
   Image Name:   2.4.8 for MPC860T Board
   Image Type:   PowerPC Linux Kernel Image (gzip compressed)
   Data Size:    535804 Bytes = 523 kB = 0 MB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK
## Transferring control to Linux (at address 00000000) ...





ByungGi Baek.
weapon100@hanmail.net


===========================================================================
우리 인터넷, Daum  http://www.daum.net
- 2002 대입 1:1상담,원서접수,합격자발표 ☞ http://hmm.daum.net/daeip_0112
- 인터넷에서 '토정비결' 보세요~ ☞ http://hmm.daum.net/fortune_0112

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply

* [Linux-ia64] kmalloc() size-limitation
From: Christian Hildner @ 2002-01-15  7:14 UTC (permalink / raw)
  To: linux-ia64

David,

you proposed me to use alloc_pages() instead of kmalloc() in order to get memory bigger than the
128K limit of the kmalloc() call. But even driver-developers don't want to handle with the page
struct unless this is unavoidable. Which are the disadvantages of increasing the size limit of
kmalloc() to 256K, 512K or 1M since machines are getting bigger and 64Bit machines break with
current memory limitations?

Since kmalloc() is implemented in the non arch specific part this also goes to the lkml.

Christian



^ permalink raw reply

* Re: Ppcboot & kernel upgrade problem(2.4.x kernel does not work)
From: Wolfgang Denk @ 2002-01-15  7:33 UTC (permalink / raw)
  To: ByungGiBaek; +Cc: linuxppc-embedded@lists.linuxppc.org
In-Reply-To: <20020115155001.HM.60000000003dHZi@www7.hanmail.net>


Dear ByungGi Baek,

in message <20020115155001.HM.60000000003dHZi@www7.hanmail.net> you wrote:
>
> Now I'm trying to upgrade linux kernel from 2.2.14 to 2.4.x on our own MPC860T board(50MHz).
> I successfully download and boot linux-2.2.14 kernel with ppcboot-0.9.3.

You must update PPCBoot to a newer version:

    Q:

        I am using PPCBoot version X (X >= 1.0.5) with a Linux kernel
        version Y (Y < 2.4.5-pre5), but the last message I see is

         Uncompressing Kernel Image ... OK

        Then the system hangs.

    A:

        Most probably you pass bad parameters to the Linux kernel.
	There are several possible reasons:

            Bad definition of the bd_info structure

            You must make sure that your machine specific header file
            (for instance include/asm-ppc/tqm8xx.h) includes the same
            definition of the Board Information structure as we
            define in include/ppcboot.h, and make sure that your
            definition of IMAP_ADDR uses the same value as your
            PPCBoot configuration in CFG_IMMR.

            Bad clock information

            Before kernel version 2.4.5-pre5 (BitKeeper Patch
            1.1.1.6, 22MAY2001) the kernel expected the clock
            information in MHz, but recent kernels expect it in Hz
            instead. Starting with version 1.0.5, PPCBoot passes the
            clock information in MHz by default. To switch to the old
            behaviour, you can set the environment variable
            "clocks_in_mhz" in PPCBoot:

                     => setenv clocks_in_mhz 1
                     => saveenv



In your case it's most  probably  the  clock  frequency:  the  kernel
expects Hz, but the old PPCBoot passes MHz.

Hope this helps,

Wolfgang Denk

--
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd@denx.de
He'd heard her use that sweet, innocent  tone  of  voice  before.  It
meant that, pretty soon, there was going to be trouble.
                                        - Terry Pratchett, _Truckers_

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply

* Re: [linux-lvm] LVM Snapshot/XFS caused system hang/VG corruption
From: Heinz J . Mauelshagen @ 2002-01-15  7:55 UTC (permalink / raw)
  To: linux-lvm
In-Reply-To: <20020111230034.D26851@kluge.net>

Theo,

In order to restore your metadata for VG "t" to a sane state, you need to run:

pvcreate -ff /dev/sda4 # you need to repeat this

# needed to get rid of the snapshot
vgcfgrestore -n t -f /etc/lvmconf/t.conf.1.old /dev/sda4

vgscan # was missing!



Your assumption IRT messy minors is right (both grop files have the same
major/minor and therefore the tools access the very same VG "kluge")
and vgscan fixes that.
Maybe you need to restore from an older metadata backup file using
"vgcfgrestore -f /etc/lvmconf/t.conf.2.old -n t /dev/sda4" in order to get
rid of the messy snapshot metadata. You can have a look at the backup file
contents with "vgcfgrestore -n t -f /etc/lvmconf/t.conf.2.old -ll" and check,
if it doesn't contain the snapshot or if you need to use an older one.

Please remember to take actual backups of /etc/lvmconf/ in order to make
sure, that you have all metadata backup files at hand in case something
goes wrong. I presume that you have backups for the rest anyway ;-)

Regards,
Heinz    -- The LVM Guy --


On Fri, Jan 11, 2002 at 11:00:34PM -0500, Theo Van Dinter wrote:
> As I am planning to put LVM/XFS into place on my "production" system in the
> next few weeks, I decided to start playing around with things like snapshots.
> Unfortunately, my first attempt to create a snapshot failed miserably and the
> machine locked up cold:
> 
> # pvcreate /dev/sda4
> # vgcreate t /dev/sda4
> # lvcreate -n 1 -L 1G t
> # mkfs -t xfs /dev/t/1
> # mount /dev/t/1 /mnt/test
> # <put some data on /mnt/test>
> # lvcreate -s -n 1.snap -L 1G /dev/t/1
> # mount -t xfs -o ro,nouuid,norecovery /dev/t/1.snap /mnt/testsnap
> 
> At this point, everything was mounted and things looked good.  Then I tried
> to write some more data to /mnt/test, and the machine locked up cold.  After
> rebooting, the VG "t" won't activate:
> 
> # vgchange -a y t
> vgchange -- ERROR "parameter error" setting up snapshot copy on write
> exception table for "/dev/t/1.snap"
> 
> 
> 
> In a quick google/lvm-archive search, I've found that the suggested solution
> is to recover the backup metadata file:
> 
> # vgcfgrestore -n t /dev/sda4
> vgcfgrestore -- VGDA for "t" successfully restored to physical volume
> "/dev/sda4"
> # vgchange -a y t
> vgchange -- volume group "t" already active
> # lvscan
> lvscan -- ACTIVE            "/dev/kluge/swap" [128.00 MB]
> lvscan -- ACTIVE            "/dev/kluge/var" [128.00 MB]
> lvscan -- ACTIVE            "/dev/kluge/mp3s" [9.49 GB]
> lvscan -- ACTIVE            "/dev/kluge/swap" [128.00 MB]
> lvscan -- ACTIVE            "/dev/kluge/var" [128.00 MB]
> lvscan -- ACTIVE            "/dev/kluge/mp3s" [9.49 GB]
> lvscan -- 6 logical volumes with 19.48 GB total in 2 volume groups
> lvscan -- 6 active logical volumes
> 
> 
> So I'm now missing the non-snapshot volume in VG "t", and the other LVs I
> have in a different VG are listed twice.  After doing some investigation
> ("vgdisplay -v kluge"), I found that there are, in fact, only 1 of each in
> VG kluge, and via "vgdisplay -v t", all three are listed there too:
> 
> # vgdisplay -v t
> --- Volume group ---
> VG Name               kluge
> VG Access             read/write
> VG Status             available/resizable
> VG #                  1
> MAX LV                255
> Cur LV                3
> Open LV               3
> MAX LV Size           255.99 GB
> Max PV                255
> Cur PV                1
> Act PV                1
> VG Size               13.48 GB
> PE Size               4.00 MB
> Total PE              3450
> Alloc PE / Size       2493 / 9.74 GB
> Free  PE / Size       957 / 3.74 GB
> VG UUID               YbiqZe-PRyl-xzg9-oEuD-lmgs-r8xt-3tE7Qy
> 
> --- Logical volume ---
> LV Name                /dev/kluge/swap
> VG Name                kluge
> LV Write Access        read/write
> LV Status              available
> LV #                   2
> # open                 1
> LV Size                128.00 MB
> Current LE             32
> Allocated LE           32
> Allocation             next free
> Read ahead sectors     120
> Block device           58:2
> 
> --- Logical volume ---
> LV Name                /dev/kluge/var
> VG Name                kluge
> LV Write Access        read/write
> LV Status              available
> LV #                   3
> # open                 1
> LV Size                128.00 MB
> Current LE             32
> Allocated LE           32
> Allocation             next free
> Read ahead sectors     120
> Block device           58:3
> 
> --- Logical volume ---
> LV Name                /dev/kluge/mp3s
> VG Name                kluge
> LV Write Access        read/write
> LV Status              available
> LV #                   4
> # open                 1
> LV Size                9.49 GB
> Current LE             2429
> Allocated LE           2429
> Allocation             next free
> Read ahead sectors     120
> Block device           58:4
> 
> 
> --- Physical volumes ---
> PV Name (#)           /dev/hda4 (1)
> PV Status             available / allocatable
> Total PE / Free PE    3450 / 957
> 
> 
> And looking in the /dev/t area:
> 
> dilbert  10:55pm  [/dev/t/] # ls -la /dev/t
> total 172
> dr-xr-xr-x    2 root     root           39 Jan 11 22:46 .
> drwxr-xr-x   19 root     root        98304 Jan 11 22:46 ..
> brw-rw----    1 root     disk      58,   3 Jan 11 22:46 1
> brw-rw----    1 root     disk      58,   4 Jan 11 22:46 1.snap
> crw-r-----    1 root     disk     109,   1 Jan 11 22:46 group
> 
> 
> 
> So things are confused.  I'm not 100%, but I'm thinking it's related to
> conflicting major/minor numbers:
> 
> dilbert  10:56pm  [/dev/t/] # ls -la /dev/kluge/
> total 172
> dr-xr-xr-x    2 root     root           50 Jan 11 22:30 .
> drwxr-xr-x   19 root     root        98304 Jan 11 22:46 ..
> crw-r-----    1 root     disk     109,   1 Jan 11 22:30 group
> brw-rw----    1 root     disk      58,   4 Jan 11 22:30 mp3s
> brw-rw----    1 root     disk      58,   2 Jan 11 22:30 swap
> brw-rw----    1 root     disk      58,   3 Jan 11 22:30 var
> 
> 
> 
> There are no log entries after the snapshot mount and before the hard
> reboot, and there are no log entries about the "recovery".
> 
> So, what to do now?  I can't deactivate VG "t" because it thinks it has 3
> active LVs.
> 
> I'm running LVM 1.0.1-rc4, kernel 2.4.9-13SGI_XFS_1.0.2, on an Athlon-based
> system.  The test VG is stored on a new 3ware RAID card.
> 
> 
> Thanks. :)
> 
> -- 
> Randomly Generated Tagline:
> "As I uploaded the resultant kernel, a specter of the holy penguin
>  appeared before me, and said "It is Good. It is Bugfree". As if wanting
>  to re-assure me that yes, it really =was= the holy penguin, it finally
>  added "Do you have any Herring?" before fading out in a puff of holy
>  penguin-smoke." - Linus Torvalds
> 
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@sistina.com
> http://lists.sistina.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://www.sistina.com/lvm/Pages/howto.html

*** Software bugs are stupid.
    Nevertheless it needs not so stupid people to solve them ***

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Heinz Mauelshagen                                 Sistina Software Inc.
Senior Consultant/Developer                       Am Sonnenhang 11
                                                  56242 Marienrachdorf
                                                  Germany
Mauelshagen@Sistina.com                           +49 2626 141200
                                                       FAX 924446
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

^ permalink raw reply

* RE: [Linux-ia64] kmalloc() size-limitation
From: Tang, Yu @ 2002-01-15  7:56 UTC (permalink / raw)
  To: linux-ia64
In-Reply-To: <marc-linux-ia64-105590698805828@msgid-missing>

if I am not missing something, kmalloc is SLAB based on _get_free_pages
nowadays,  and alloc_pages() is based on _get_free_pages directly.  you may
get the more limitations than alloc_pages(). the reason for choosing kmalloc
mainly, is that it makes less fragments when allocing and freeing memories
that's not large as pages.

-----Original Message-----
From: Christian Hildner [mailto:christian.hildner@hob.de]
Sent: 2002年1月15日 15:15
To: davidm@hpl.hp.com; linux ia64 kernel list; LKML
Subject: [Linux-ia64] kmalloc() size-limitation


David,

you proposed me to use alloc_pages() instead of kmalloc() in order to get
memory bigger than the
128K limit of the kmalloc() call. But even driver-developers don't want to
handle with the page
struct unless this is unavoidable. Which are the disadvantages of increasing
the size limit of
kmalloc() to 256K, 512K or 1M since machines are getting bigger and 64Bit
machines break with
current memory limitations?

Since kmalloc() is implemented in the non arch specific part this also goes
to the lkml.

Christian


_______________________________________________
Linux-IA64 mailing list
Linux-IA64@linuxia64.org
http://lists.linuxia64.org/lists/listinfo/linux-ia64


^ permalink raw reply

* Re: [linux-lvm] Could vgscan read a file of "preferred" LV name -> minor device id ?
From: Heinz J . Mauelshagen @ 2002-01-15  8:03 UTC (permalink / raw)
  To: linux-lvm
In-Reply-To: <20020111104116.GB1274@tykepenguin.com>

On Fri, Jan 11, 2002 at 10:41:16AM +0000, Patrick Caulfield wrote:
> On Fri, Jan 11, 2002 at 07:11:00AM +0000, Piete Brooks wrote:
> > I'm getting complaints from NFS users that when servers reboot, they often 
> > find that their mounts have the wrong data.  I've never really worked out 
> > which end hold what in NFS FHs, but the basic idea is that a client identifies 
> > a FH which encodes (major dev id,minor dev id,inode number,version).
> > This appears to break down when a new LV is created ane the server rebooted.
> > As the /dev/<vg>/<lv> nodes are numbered strictly in the order that they are 
> > discovered, all LV minor device IDs on subsequent VGs are renumbered, so any 
> > remote caching of FHs breaks (( as with SCSI )).
> > 
> > Is that about right ?
> > 
> > Would it be possible for vgscan to read a "hints" file consisting of <vg>/<lv> 
> > and minor device number pairs ?
> > 
> > As each <vg>/<lv> is found, if it's in the file, the nominated minor device id 
> > is used; if it's not found, then the next minor device id which is not listed 
> > in the file is used.
> > 
> > [[ I use devfs, so using existing data in /dev/ would not help -- but I think 
> > it would do no harm to use that data by default ]]
> > 
> 
> I thought Heinz had fixed this in 1.0.1, what version are you using (tools &
> kernel)?

That's right. It is in since 1.0.1.

> 
> patrick
> 
> 
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@sistina.com
> http://lists.sistina.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://www.sistina.com/lvm/Pages/howto.html

-- 

Regards,
Heinz    -- The LVM Guy --

*** Software bugs are stupid.
    Nevertheless it needs not so stupid people to solve them ***

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Heinz Mauelshagen                                 Sistina Software Inc.
Senior Consultant/Developer                       Am Sonnenhang 11
                                                  56242 Marienrachdorf
                                                  Germany
Mauelshagen@Sistina.com                           +49 2626 141200
                                                       FAX 924446
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

^ permalink raw reply

* Re: [linux-lvm] ERROR "pv_read(): PV identifier invalid" reading physical volumes
From: Heinz J . Mauelshagen @ 2002-01-15  8:15 UTC (permalink / raw)
  To: linux-lvm
In-Reply-To: <1010529428.19493.48.camel@localhost.localdomain>

On Tue, Jan 08, 2002 at 04:37:08PM -0600, Matthew Kennedy wrote:
> 
> Never mind. A little more perseverance and I learned that it was my IDE
> cdrw drive. I needed to add "append="ide-scsi"" to the relevant
> /etc/lilo.conf stanza and then add ide-scsi to /etc/modules so that it
> loads at boot.
> 
> Shouldn't LVM check against such devices being present and then skip
> over them though?

We are adding config file support for inclusion and exclusion of arbitrary
devices to LVM2 which will give the user much more control as any hard coded
logic.

> 
> Matt
> 
> On Tue, 2002-01-08 at 16:06, Matthew Kennedy wrote:
> > Hello,
> > 
> > I'm having some trouble getting LVM to work on a Debian system. The
> > actions I performed are bellow (--verbose --debug versions are
> > attached). Bascically, I get "ERROR "pv_read(): PV identifier invalid"
> > reading physical volumes" when I run vgcreate even though the PV I
> > initialized succeeded.
> > 
> > My user tools are IOP10. Kernel is 2.4.17.
> > 
> > Thanks
> > 
> > Matt
> > 
> 
> 
> 
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@sistina.com
> http://lists.sistina.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://www.sistina.com/lvm/Pages/howto.html

-- 

Regards,
Heinz    -- The LVM Guy --

*** Software bugs are stupid.
    Nevertheless it needs not so stupid people to solve them ***

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Heinz Mauelshagen                                 Sistina Software Inc.
Senior Consultant/Developer                       Am Sonnenhang 11
                                                  56242 Marienrachdorf
                                                  Germany
Mauelshagen@Sistina.com                           +49 2626 141200
                                                       FAX 924446
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

^ permalink raw reply

* Re: [linux-lvm] summary of what I need to do to mount snapshot on XFS
From: Heinz J . Mauelshagen @ 2002-01-15  8:19 UTC (permalink / raw)
  To: linux-lvm
In-Reply-To: <E16OSId-0005Vf-00@hermes.sistina.com>

On Thu, Jan 10, 2002 at 09:38:08AM +1000, Adrian Head wrote:
> If this works for you - good.  I have had heaps of issues that I have been 
> working with various developers and trying to get fixed.
> 
> Basically if I used the SGI 2.4.17-xfs kernel with lvm-1.0.1rc4(ish) some 
> file systems would work but others would fail.  Some would fail on snapshot 
> creation, others would fail on snapshot mount and others would fail when the 
> snapshot overflowed.  When I upgraded LVM to lvm-1.0.1 other filesystems 
> issues were fixed but others broke again.  Check out the "Unable to get XFS, 
> ext3, reiserfs & LVM to coexist happily"
> http://marc.theaimsgroup.com/?l=linux-lvm&m=100994364215110&w=2
>  thread on linux-lvm / linux-xfs mail archives and see if any of this relates 
> to your problem.  With 2.4.17-xfs + lvm-1.0.1 upgrade patch + VFS-lock patch 
> ext2/3 & resierfs will operate correctly but XFS will fail at snapshot 
> creation.  You can do a little source code change and get a XFS snapshot 
> created and mounted; but then it will fail on an overfull snapshot.  These 
> problems are being worked on by myself and the great SGI XFS developers.
> 
> The lvm.c change you talk about I assume is the LVM_VFS_ENHANCEMENT change?  
> For some reason when adding the lvm-1.0.1 upgrade patch this disappears from 
> lvm.c   I have been able to get this to compile with the change but I have 
> forgoten what I did.  
> 
> This is one question I would like answered by the LVM gurus:  should #define 
> LVM_VFS_ENHANCEMENT still be there after upgrading to lvm-1.0.1?

Yes.

> What does 
> LVM_VFS_ENHANCEMENT actually do w.r.t lvm-1.0.1rc4(ish) and lvm-1.0.1?

What it did before: compile the VFS lock/unlock calls in.

> I 
> know that LVM_VFS_ENHANCEMENT in older LVM versions was the locking of the 
> VFS so that snapshots would be consistant - is this still correct and is it 
> still needed?

Yes.

> 
> For the "large discussion" you are talking about the "Unable to get XFS, 
> ext3, reiserfs & LVM to coexist happily" thread - hit me off list and I will 
> attempt to summarise it for you.
> 
> On Thu, 10 Jan 2002 06:09, Jeremy Hansen wrote:
> > My issue wasn't so much with how to create the snapshot but how to
> > simultaneously mount the snapshot with the live filesystem.  I saw a big
> > thread about having to uncomment from lvm.c, did that but then got
> > unresolved symbols...
> >
> > It seemed as if there were some issues and a large discussion related to
> > doing this with XFS.
> >
> > Thanks
> > -jeremy
> 
> -- 
> Adrian Head
> 
> (Public Key available on request.)
> 
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@sistina.com
> http://lists.sistina.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://www.sistina.com/lvm/Pages/howto.html

-- 

Regards,
Heinz    -- The LVM Guy --

*** Software bugs are stupid.
    Nevertheless it needs not so stupid people to solve them ***

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Heinz Mauelshagen                                 Sistina Software Inc.
Senior Consultant/Developer                       Am Sonnenhang 11
                                                  56242 Marienrachdorf
                                                  Germany
Mauelshagen@Sistina.com                           +49 2626 141200
                                                       FAX 924446
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

^ permalink raw reply

* Re: [linux-lvm] Re: GRUB + LVM + XFS?
From: Heinz J . Mauelshagen @ 2002-01-15  8:21 UTC (permalink / raw)
  To: linux-lvm
In-Reply-To: <200201080927.g089QVJ00669@hammer.brocade.com>

On Tue, Jan 08, 2002 at 10:48:11AM +1000, Adrian Head wrote:
> On Tue, 8 Jan 2002 05:54, Rupa Schomaker wrote:
> > I'm having toubles with the current CVS version of the XFS kernel.  I
> > haven't had time to look at it completely, but... it could be:
> >
> > 1) mismatch between userspace and kernel (what LVM is in the XFS
> >    kernel?  I'm using the debian lvm10 userspace).
> >
> > 2) bad config
> >
> > 3) ???
> >
> > A quick "bt" at boot in kdb shows that devfs is in the call path.  No,
> > I haven't had time to write everything down. :(  Man, I wish there was
> > an easy to dump the kdb info or an OOPs to disk...
> 
> Well all I do is for getting kdb output is to use a serial console and 
> another computer - then cut and past then send  ;-).
> 
> It is very interesting that devfs is referenced - there was a LVM memory 
> corruption problem and a patch for LVM/devfs - it can be found here:
> http://marc.theaimsgroup.com/?l=linux-xfs&m=101031443221058&w=2
> 
> From my experience it seems that LVM 1.0.1rc4(ish) is way more robust than 
> the updated LVM 1.0.1 or even CVS LVM 1.0.1 yesterday.

Do you have some input which particular changes cause it?
Thanks.

> However, not 
> everything works as expected with either. You can find a results table for a 
> few tests I have conducted here: (of course YMMV)
> http://marc.theaimsgroup.com/?l=linux-lvm&m=100994364215110&w=2
> 
> I think you would be very interested in the discussions and activity that has 
> been occuring on the linux-xfs & linux-lvm lists at the moment regarding XFS 
> and LVM.  If you are seeing problems I would be very interested in finding 
> out how your problems differ from mine.
> 
> -- 
> Adrian Head
> 
> (Public Key available on request.)
> 
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@sistina.com
> http://lists.sistina.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://www.sistina.com/lvm/Pages/howto.html

-- 

Regards,
Heinz    -- The LVM Guy --

*** Software bugs are stupid.
    Nevertheless it needs not so stupid people to solve them ***

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Heinz Mauelshagen                                 Sistina Software Inc.
Senior Consultant/Developer                       Am Sonnenhang 11
                                                  56242 Marienrachdorf
                                                  Germany
Mauelshagen@Sistina.com                           +49 2626 141200
                                                       FAX 924446
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

^ permalink raw reply

* Re: [Ext2-devel] [ahead@bigpond.net.au: [linux-lvm] Re: Unable to get XFS, ext3, reiserfs & LVM to coexist happily]
From: Heinz J . Mauelshagen @ 2002-01-15  8:23 UTC (permalink / raw)
  To: linux-lvm
In-Reply-To: <20020107163907.J20581@redhat.com>

On Mon, Jan 07, 2002 at 04:39:07PM +0000, Stephen C. Tweedie wrote:
> Hi,
> 
> On Sat, Jan 05, 2002 at 04:14:47PM -0700, Andreas Dilger wrote:
> > Adrian Head <ahead@bigpond.net.au> wrote:
> > > This is the full output from kdb when trying to create a snapshot on an XFS 
> > > volume for me.
> > 
> > The system is running 2.4.17 + LVM patch (relatively minor) + VFS-lock
> > (needed for snapshots) + 2.4.17 XFS patch, IIRC.  This has been discussed
> > on linux-lvm and linux-xfs for a couple of days.  What is strange is that
> > this is happening while doing an XFS snapshot, but the oops is consistently
> > in ext3.  There are several other ext3 filesystems on the system in
> > question.
> 
> Is XFS or LVM using current->journal_info for anything, and if so, is
> it being left non-zero by anyone?

LVM doesn't touch it.

> 
> --Stephen
> 
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@sistina.com
> http://lists.sistina.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://www.sistina.com/lvm/Pages/howto.html

-- 

Regards,
Heinz    -- The LVM Guy --

*** Software bugs are stupid.
    Nevertheless it needs not so stupid people to solve them ***

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Heinz Mauelshagen                                 Sistina Software Inc.
Senior Consultant/Developer                       Am Sonnenhang 11
                                                  56242 Marienrachdorf
                                                  Germany
Mauelshagen@Sistina.com                           +49 2626 141200
                                                       FAX 924446
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

^ permalink raw reply

* Re: [linux-lvm] vgscan problem
From: Heinz J . Mauelshagen @ 2002-01-15  8:30 UTC (permalink / raw)
  To: linux-lvm
In-Reply-To: <Pine.LNX.4.33.0201062011010.681-100000@Prometheus.schaefer.nu>

Andrew,

so you did pvcreate the second PV and added (vgextend) it to your existing
VG successfully?
What exactly happened before vgscan complained?

You should have a valid LVM metadata backup in /etc/lvmconf/big_space.conf
(or an older copy named /etc/lvmconf/big_space.conf.#.old where # is a number
from 1 up to 9).
To figure out which one is ok you want to for eg. use

vgcfgrestore -n big_space -f /etc/lvmconf/big_space.conf -ll


To restore the metadata run:

pvcreate -ff /dev/BothOfYourPVs
vgcfgrestore -n big_space -f /etc/lvmconf/big_space.conf /dev/Your1stPV
vgcfgrestore -n big_space -f /etc/lvmconf/big_space.conf /dev/Your2ndPV
vgscan

On Sun, Jan 06, 2002 at 08:32:09PM -0500, Andrew Schaefer wrote:
> I just setup LVM with two disks in the volume group big_space.  I started
> out with one disk and then extended it across the other.  It
> formatted, fs extended, and mounted up fine.  I then rebooted, and now I
> get this error from vgscan:
> 
> vgscan -- reading all physical volumes (this may take a while...)
> vgscan -- found inactive volume group "big_space"
> vgscan -- ERROR "pv_read_pe(): read" can't get data of volume group
> "big_space"
> from physical volume(s)
> vgscan -- "/etc/lvmtab" and "/etc/lvmtab.d" successfully created
> vgscan -- WARNING: This program does not do a VGDA backup of your volume
> group
> 
> Any ideas or suggestions?  Unfortunately I threw data onto the volume and
> don't want to loose it.
> 
> Andrew Schaefer
> andrew@schaefer.nu
> http://www.schaefer.nu
> 
> 
> 
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@sistina.com
> http://lists.sistina.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://www.sistina.com/lvm/Pages/howto.html

-- 

Regards,
Heinz    -- The LVM Guy --

*** Software bugs are stupid.
    Nevertheless it needs not so stupid people to solve them ***

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Heinz Mauelshagen                                 Sistina Software Inc.
Senior Consultant/Developer                       Am Sonnenhang 11
                                                  56242 Marienrachdorf
                                                  Germany
Mauelshagen@Sistina.com                           +49 2626 141200
                                                       FAX 924446
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

^ permalink raw reply

* Re: [linux-lvm] bug or feature request
From: Heinz J . Mauelshagen @ 2002-01-15  8:47 UTC (permalink / raw)
  To: linux-lvm
In-Reply-To: <200201051914.g05JER030894@mail1.bas-net.by>

On Sat, Jan 05, 2002 at 09:15:48PM +0200, Andrei V. Darashenka wrote:
> Hello!
> I use LVM in many places and very common problem is 
> rejecting to find volumes on several devices which is attached after booting.
> (properly, rejecting to add to the dir_cache becouse scan_partitions finds 
> some devices and scan_devs even not called!)
> 
> Please change this behaviour becouse I need to patch LVM every time I need to 
> use such devices (loop, md).

Recently we've put in MD and LOOP releated patches.
What are we still missing you need to patch in addition to current CVS?

> 
> -- 
> 
> Andrei.
> 
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@sistina.com
> http://lists.sistina.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://www.sistina.com/lvm/Pages/howto.html

-- 

Regards,
Heinz    -- The LVM Guy --

*** Software bugs are stupid.
    Nevertheless it needs not so stupid people to solve them ***

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Heinz Mauelshagen                                 Sistina Software Inc.
Senior Consultant/Developer                       Am Sonnenhang 11
                                                  56242 Marienrachdorf
                                                  Germany
Mauelshagen@Sistina.com                           +49 2626 141200
                                                       FAX 924446
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

^ permalink raw reply

* Re: [linux-lvm] lvchange problem
From: Heinz J . Mauelshagen @ 2002-01-15  8:50 UTC (permalink / raw)
  To: linux-lvm
In-Reply-To: <25E4CA13D679FF48BC307694202209710164DE2E@nd1-clusa.local.bunnings.com.au>

Colin,

that was fixed recently.
LVM 1.0.1 works.

Regards,
Heinz    -- The LVM Guy --

On Fri, Jan 04, 2002 at 02:23:52PM +0800, Colin Coe wrote:
> 
> Hi all
> 
> I have come across a problem with lvchange.  When I change the availability
> of an LV from active to inactive, and then try and change it back I get the
> error "Operation not permitted".  I can only get the LV back by rebooting.
> 
> A search of Google turned up something similar but there were no responses
> to that post.
> 
> System details are: 
> Pentium II-400
> 2 x 20GB Quantum drives
> 256MB RAM
> 2.4.14 with XFS
> lvm-tools              1.0.1rc4-2
> Gnu C                  2.96
> Gnu make               3.79.1
> binutils               2.11.90.0.8
> util-linux             2.11f
> mount                  2.11g
> modutils               2.4.6
> e2fsprogs              1.23
> reiserfsprogs          3.x.0j
> Linux C Library        2.2.4
> Dynamic linker (ldd)   2.2.4
> Procps                 2.0.7
> Net-tools              1.60
> Console-tools          0.3.3
> Sh-utils               2.0.11
> 
> 
> Any ideas?
> 
> CC
> 
> 
> [root@linux-lvm root]# df -k
> Filesystem           1k-blocks      Used Available Use% Mounted on
> /dev/md0               2042880   1335560    707320  66% /
> /dev/md1                 59328      5292     54036   9% /boot
> none                    127472         0    127472   0% /dev/shm
> /dev/rootvg/bbs          60736        80     60656   1% /bbs
> /dev/rootvg/bbsdata    2026816       144   2026672   1% /bbs/data
> 
> [root@linux-lvm root]# umount /bbs/data
> 
> [root@linux-lvm root]# lvchange -an /dev/rootvg/bbsdata
> lvchange -- logical volume "/dev/rootvg/bbsdata" changed
> lvchange -- doing automatic backup of volume group "rootvg"
> lvchange -- no difference to old backup in "/etc/lvmconf/rootvg.conf"
> 
> [root@linux-lvm root]# df -k
> Filesystem           1k-blocks      Used Available Use% Mounted on
> /dev/md0               2042880   1335580    707300  66% /
> /dev/md1                 59328      5292     54036   9% /boot
> none                    127472         0    127472   0% /dev/shm
> /dev/rootvg/bbs          60736        80     60656   1% /bbs
> 
> [root@linux-lvm root]# lvchange -ay /dev/rootvg/bbsdata
> lvchange -- ERROR "Operation not permitted" couldn't open logical volume
> "/dev/rootvg/bbsdata"
> 
> And the same again in verbose mode.
> 
> [root@linux-lvm root]# lvchange -ay -v /dev/rootvg/bbsdata
> lvchange -- locking logical volume manager
> lvchange -- checking logical volume name
> lvchange -- checking volume group existence
> lvchange -- checking for active volume group "rootvg"
> lvchange -- reading volume group data of "rootvg" from disk(s)
> lvchange -- checking consistency of "rootvg"
> lvchange -- checking logical volume "/dev/rootvg/bbsdata" existence
> lvchange -- getting index of logical volume "/dev/rootvg/bbsdata" in volume
> group "rootvg"
> lvchange -- getting status of "/dev/rootvg/bbsdata" from VGDA in kernel
> lvchange -- changing logical volume "/dev/rootvg/bbsdata" in VGDA of kernel
> lvchange -- ERROR "Operation not permitted" couldn't open logical volume
> "/dev/rootvg/bbsdata"
> 
> 
> **************************************************************************
> Bunnings Legal Disclaimer: 
> 
> 1) 	This document is confidential and may contain legally privileged 
> 	information. If you are not the intended recipient you must not 
> 	read, copy, distribute or act in reliance on it.
> 	If you have received this document in error, please telephone
> 	us immediately on (08) 9365-1555. 
> 
> 2)	All e-mails sent to and sent from Bunnings Building Supplies are
> 	scanned for content. Any material deemed to contain inappropriate
> 	subject matter will be reported to the e-mail administrator of
> 	all parties concerned.
> 
> **************************************************************************
> 
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@sistina.com
> http://lists.sistina.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://www.sistina.com/lvm/Pages/howto.html

*** Software bugs are stupid.
    Nevertheless it needs not so stupid people to solve them ***

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Heinz Mauelshagen                                 Sistina Software Inc.
Senior Consultant/Developer                       Am Sonnenhang 11
                                                  56242 Marienrachdorf
                                                  Germany
Mauelshagen@Sistina.com                           +49 2626 141200
                                                       FAX 924446
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

^ permalink raw reply

* Re: [linux-lvm] LE discussion
From: Heinz J . Mauelshagen @ 2002-01-15  9:02 UTC (permalink / raw)
  To: linux-lvm
In-Reply-To: <E16LzRS-0003eG-00@hermes.sistina.com>

On Thu, Jan 03, 2002 at 02:28:21PM +1000, Adrian Head wrote:
> The only mention I have seen about this topic is in the mail archives:
> http://marc.theaimsgroup.com/?l=linux-lvm&m=99965651611876&w=2

I added something to the vgcreate(8) man page in CVS already.

> 
> On Thu, 3 Jan 2002 14:08, Adrian Noland wrote:
> > Thought I would qualify a little bit more.... I'm planning on using
> > this box as an all-purpose server HTTP/PHP/DNS/SMTP/SQL etc... So, my
> > question is in this context. Thanks again.
> >
> > --- Adrian Noland <anoland@yahoo.com> wrote:
> > > Hello,
> > > I'm starting to use LVM, and I would like to know the pros & cons of
> > > using a different LE size other than the 4mb default. What kind of
> > > performance issues are there with different size LE's? I saw a *very*
> > > brief discussion in one of the docs (not the HOWTO), but cant find
> > > the
> > > reference now.
> > > Thanks,
> > > Adrian
> > >
> 
> -- 
> Adrian Head
> 
> (Public Key available on request.)
> 
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@sistina.com
> http://lists.sistina.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://www.sistina.com/lvm/Pages/howto.html

-- 

Regards,
Heinz    -- The LVM Guy --

*** Software bugs are stupid.
    Nevertheless it needs not so stupid people to solve them ***

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Heinz Mauelshagen                                 Sistina Software Inc.
Senior Consultant/Developer                       Am Sonnenhang 11
                                                  56242 Marienrachdorf
                                                  Germany
Mauelshagen@Sistina.com                           +49 2626 141200
                                                       FAX 924446
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

^ permalink raw reply

* Re: [linux-lvm] summary of what I need to do to mount snapshot on XFS
From: Adrian Head @ 2002-01-15  9:10 UTC (permalink / raw)
  To: linux-lvm, Heinz J . Mauelshagen
In-Reply-To: <20020115151621.E11005@sistina.com>

On Wed, 16 Jan 2002 00:16, Heinz J . Mauelshagen wrote:
> > The lvm.c change you talk about I assume is the LVM_VFS_ENHANCEMENT
> > change? For some reason when adding the lvm-1.0.1 upgrade patch this
> > disappears from lvm.c   I have been able to get this to compile with the
> > change but I have forgoten what I did.
> >
> > This is one question I would like answered by the LVM gurus:  should
> > #define LVM_VFS_ENHANCEMENT still be there after upgrading to lvm-1.0.1?
>
> Yes.

I have found that using the generated lvm-1.0.1 upgrade patch that the 
#define LVM_VFS_ENHANCEMENT gets removed.  If all I do is add it back in 
manually - do I need to worry about other areas of the code that also need 
touch-ups?  How would I tell?

Thanks

-- 
Adrian Head

(Public Key available on request.)

^ permalink raw reply

* [PATCH] need_resched abstraction
From: David Howells @ 2002-01-15  9:13 UTC (permalink / raw)
  To: torvalds; +Cc: dhowells, linux-kernel


The attached patch abstracts access to need_resched in as many places as is
reasonable. It makes two replacements:

  (1) testing current->need_resched:

	if (current->need_resched) ...

      is replaced with:

	if (need_yield()) ...

  (2) testing current->need_resched and immediately scheduling if set:

	if (current->need_resched)
		schedule();

      is replaced with:

	yield_point();

      [since yield() is already defined to be something else].

David

_______________________________________________________________________________
diff -uNr linux-2.5.2/Documentation/DocBook/kernel-hacking.tmpl linux-yield-252/Documentation/DocBook/kernel-hacking.tmpl
--- linux-2.5.2/Documentation/DocBook/kernel-hacking.tmpl	Tue Jan 15 08:19:49 2002
+++ linux-yield-252/Documentation/DocBook/kernel-hacking.tmpl	Tue Jan 15 08:40:37 2002
@@ -371,8 +371,7 @@
   </para>
 
   <programlisting>
-if (current-&gt;need_resched)
-        schedule(); /* Will sleep */ 
+yield_point(); /* Will sleep */ 
   </programlisting>
 
   <para>
diff -uNr linux-2.5.2/arch/arm/kernel/process.c linux-yield-252/arch/arm/kernel/process.c
--- linux-2.5.2/arch/arm/kernel/process.c	Tue Jan 15 08:19:49 2002
+++ linux-yield-252/arch/arm/kernel/process.c	Tue Jan 15 08:40:37 2002
@@ -91,7 +91,7 @@
 		if (!idle)
 			idle = arch_idle;
 		leds_event(led_idle_start);
-		while (!current->need_resched)
+		while (!need_yield())
 			idle();
 		leds_event(led_idle_end);
 		schedule();
diff -uNr linux-2.5.2/arch/i386/kernel/apm.c linux-yield-252/arch/i386/kernel/apm.c
--- linux-2.5.2/arch/i386/kernel/apm.c	Tue Jan 15 08:16:48 2002
+++ linux-yield-252/arch/i386/kernel/apm.c	Tue Jan 15 08:40:37 2002
@@ -766,14 +766,14 @@
 
 	start_idle = jiffies;
 	while (1) {
-		if (!current->need_resched) {
+		if (!need_yield()) {
 			if (jiffies - start_idle < HARD_IDLE_TIMEOUT) {
 				if (!current_cpu_data.hlt_works_ok)
 					continue;
 				if (hlt_counter)
 					continue;
 				__cli();
-				if (!current->need_resched)
+				if (!need_yield())
 					safe_halt();
 				else
 					__sti();
diff -uNr linux-2.5.2/arch/i386/kernel/process.c linux-yield-252/arch/i386/kernel/process.c
--- linux-2.5.2/arch/i386/kernel/process.c	Tue Jan 15 08:19:49 2002
+++ linux-yield-252/arch/i386/kernel/process.c	Tue Jan 15 08:40:37 2002
@@ -81,7 +81,7 @@
 {
 	if (current_cpu_data.hlt_works_ok && !hlt_counter) {
 		__cli();
-		if (!current->need_resched)
+		if (!need_yield())
 			safe_halt();
 		else
 			__sti();
@@ -127,7 +127,7 @@
 		void (*idle)(void) = pm_idle;
 		if (!idle)
 			idle = default_idle;
-		while (!current->need_resched)
+		while (!need_yield())
 			idle();
 		schedule();
 		check_pgt_cache();
diff -uNr linux-2.5.2/arch/i386/math-emu/fpu_entry.c linux-yield-252/arch/i386/math-emu/fpu_entry.c
--- linux-2.5.2/arch/i386/math-emu/fpu_entry.c	Tue Jan 15 08:16:48 2002
+++ linux-yield-252/arch/i386/math-emu/fpu_entry.c	Tue Jan 15 08:40:37 2002
@@ -559,7 +559,7 @@
   RE_ENTRANT_CHECK_ON;
 #endif /* DEBUG */
 
-  if (FPU_lookahead && !current->need_resched)
+  if (FPU_lookahead && !need_yield())
     {
       FPU_ORIG_EIP = FPU_EIP - code_base;
       if ( valid_prefix(&byte1, (u_char **)&FPU_EIP,
diff -uNr linux-2.5.2/arch/ia64/kernel/process.c linux-yield-252/arch/ia64/kernel/process.c
--- linux-2.5.2/arch/ia64/kernel/process.c	Tue Jan 15 08:19:49 2002
+++ linux-yield-252/arch/ia64/kernel/process.c	Tue Jan 15 08:40:37 2002
@@ -117,10 +117,10 @@
 
 	while (1) {
 #ifdef CONFIG_SMP
-		if (!current->need_resched)
+		if (!need_yield())
 			min_xtp();
 #endif
-		while (!current->need_resched)
+		while (!need_yield())
 			continue;
 #ifdef CONFIG_SMP
 		normal_xtp();
diff -uNr linux-2.5.2/arch/m68k/kernel/process.c linux-yield-252/arch/m68k/kernel/process.c
--- linux-2.5.2/arch/m68k/kernel/process.c	Tue Jan 15 08:19:49 2002
+++ linux-yield-252/arch/m68k/kernel/process.c	Tue Jan 15 08:40:37 2002
@@ -56,7 +56,7 @@
 static void default_idle(void)
 {
 	while(1) {
-		if (!current->need_resched)
+		if (!need_yield())
 #if defined(MACH_ATARI_ONLY) && !defined(CONFIG_HADES)
 			/* block out HSYNC on the atari (falcon) */
 			__asm__("stop #0x2200" : : : "cc");
diff -uNr linux-2.5.2/arch/mips/kernel/process.c linux-yield-252/arch/mips/kernel/process.c
--- linux-2.5.2/arch/mips/kernel/process.c	Tue Jan 15 08:19:49 2002
+++ linux-yield-252/arch/mips/kernel/process.c	Tue Jan 15 08:40:37 2002
@@ -39,7 +39,7 @@
 	init_idle();
 
 	while (1) {
-		while (!current->need_resched)
+		while (!need_yield())
 			if (cpu_wait)
 				(*cpu_wait)();
 		schedule();
diff -uNr linux-2.5.2/arch/mips/math-emu/cp1emu.c linux-yield-252/arch/mips/math-emu/cp1emu.c
--- linux-2.5.2/arch/mips/math-emu/cp1emu.c	Tue Jan 15 08:16:51 2002
+++ linux-yield-252/arch/mips/math-emu/cp1emu.c	Tue Jan 15 08:40:37 2002
@@ -1674,8 +1674,7 @@
 
 	oldepc = xcp->cp0_epc;
 	do {
-		if (current->need_resched)
-			schedule();
+		yield_point();
 
 		prevepc = xcp->cp0_epc;
 		insn = mips_get_word(xcp, REG_TO_VA(xcp->cp0_epc), &err);
diff -uNr linux-2.5.2/arch/mips64/kernel/process.c linux-yield-252/arch/mips64/kernel/process.c
--- linux-2.5.2/arch/mips64/kernel/process.c	Tue Jan 15 08:19:49 2002
+++ linux-yield-252/arch/mips64/kernel/process.c	Tue Jan 15 08:40:37 2002
@@ -35,7 +35,7 @@
 	init_idle();
 	current->nice = 20;
 	while (1) {
-		while (!current->need_resched)
+		while (!need_yield())
 			if (wait_available)
 				__asm__("wait");
 		schedule();
diff -uNr linux-2.5.2/arch/mips64/math-emu/cp1emu.c linux-yield-252/arch/mips64/math-emu/cp1emu.c
--- linux-2.5.2/arch/mips64/math-emu/cp1emu.c	Tue Jan 15 08:17:01 2002
+++ linux-yield-252/arch/mips64/math-emu/cp1emu.c	Tue Jan 15 08:40:37 2002
@@ -1707,8 +1707,7 @@
 
 	oldepc = xcp->cp0_epc;
 	do {
-		if (current->need_resched)
-			schedule();
+		yield_point();
 
 		prevepc = xcp->cp0_epc;
 		insn = mips_get_word(xcp, REG_TO_VA(xcp->cp0_epc), &err);
diff -uNr linux-2.5.2/arch/parisc/kernel/process.c linux-yield-252/arch/parisc/kernel/process.c
--- linux-2.5.2/arch/parisc/kernel/process.c	Tue Jan 15 08:19:49 2002
+++ linux-yield-252/arch/parisc/kernel/process.c	Tue Jan 15 08:40:37 2002
@@ -73,7 +73,7 @@
 	current->nice = 20;
 
 	while (1) {
-		while (!current->need_resched) {
+		while (!need_yield()) {
 		}
 		schedule();
 		check_pgt_cache();
diff -uNr linux-2.5.2/arch/ppc/kernel/idle.c linux-yield-252/arch/ppc/kernel/idle.c
--- linux-2.5.2/arch/ppc/kernel/idle.c	Tue Jan 15 08:19:49 2002
+++ linux-yield-252/arch/ppc/kernel/idle.c	Tue Jan 15 08:40:37 2002
@@ -71,10 +71,10 @@
 			}
 		}
 #endif
-		if (do_power_save && !current->need_resched)
+		if (do_power_save && !need_yield())
 			power_save();
 
-		if (current->need_resched) {
+		if (need_yield()) {
 			schedule();
 			check_pgt_cache();
 		}
@@ -150,7 +150,7 @@
 
 	if ( atomic_read(&zero_cache_sz) >= zero_cache_water[0] )
 		return;
-	while ( (atomic_read(&zero_cache_sz) < zero_cache_water[1]) && (!current->need_resched) )
+	while ( (atomic_read(&zero_cache_sz) < zero_cache_water[1]) && !need_yield() )
 	{
 		/*
 		 * Mark a page as reserved so we can mess with it
@@ -161,8 +161,7 @@
 		if ( !pageptr )
 			return;
 		
-		if ( current->need_resched )
-			schedule();
+		yield_point();
 		
 		/*
 		 * Make the page no cache so we don't blow our cache with 0's
@@ -181,8 +180,7 @@
 		 */
 		for ( bytecount = 0; bytecount < PAGE_SIZE ; bytecount += 4 )
 		{
-			if ( current->need_resched )
-				schedule();
+			yield_point();
 			*(unsigned long *)(bytecount + pageptr) = 0;
 		}
 		
@@ -243,7 +241,7 @@
 	 *  -- Cort
 	 */
 	_nmask_and_or_msr(MSR_EE, 0);
-	if (!current->need_resched)
+	if (!need_yield())
 	{
 		asm("mfspr %0,1008" : "=r" (hid0) :);
 		hid0 &= ~(HID0_NAP | HID0_SLEEP | HID0_DOZE);
diff -uNr linux-2.5.2/arch/s390/kernel/process.c linux-yield-252/arch/s390/kernel/process.c
--- linux-2.5.2/arch/s390/kernel/process.c	Tue Jan 15 08:19:49 2002
+++ linux-yield-252/arch/s390/kernel/process.c	Tue Jan 15 08:40:37 2002
@@ -60,7 +60,7 @@
 	wait_psw.mask = _WAIT_PSW_MASK;
 	wait_psw.addr = (unsigned long) &&idle_wakeup | 0x80000000L;
 	while(1) {
-                if (current->need_resched) {
+                if (need_yield()) {
                         schedule();
                         check_pgt_cache();
                         continue;
diff -uNr linux-2.5.2/arch/s390x/kernel/process.c linux-yield-252/arch/s390x/kernel/process.c
--- linux-2.5.2/arch/s390x/kernel/process.c	Tue Jan 15 08:19:49 2002
+++ linux-yield-252/arch/s390x/kernel/process.c	Tue Jan 15 08:40:37 2002
@@ -60,7 +60,7 @@
 	wait_psw.mask = _WAIT_PSW_MASK;
 	wait_psw.addr = (unsigned long) &&idle_wakeup;
 	while(1) {
-                if (current->need_resched) {
+                if (need_yield()) {
                         schedule();
                         check_pgt_cache();
                         continue;
diff -uNr linux-2.5.2/arch/sh/kernel/process.c linux-yield-252/arch/sh/kernel/process.c
--- linux-2.5.2/arch/sh/kernel/process.c	Tue Jan 15 08:19:49 2002
+++ linux-yield-252/arch/sh/kernel/process.c	Tue Jan 15 08:40:37 2002
@@ -44,11 +44,11 @@
 
 	while (1) {
 		if (hlt_counter) {
-			if (current->need_resched)
+			if (need_yield())
 				break;
 		} else {
 			__cli();
-			while (!current->need_resched) {
+			while (!need_yield()) {
 				__sti();
 				asm volatile("sleep" : : : "memory");
 				__cli();
diff -uNr linux-2.5.2/arch/sparc/kernel/process.c linux-yield-252/arch/sparc/kernel/process.c
--- linux-2.5.2/arch/sparc/kernel/process.c	Tue Jan 15 08:19:49 2002
+++ linux-yield-252/arch/sparc/kernel/process.c	Tue Jan 15 08:40:37 2002
@@ -106,7 +106,7 @@
 {
 	/* endless idle loop with no priority at all */
 	while(1) {
-		if(current->need_resched) {
+		if(need_yield()) {
 			schedule();
 			check_pgt_cache();
 		}
diff -uNr linux-2.5.2/arch/sparc64/kernel/process.c linux-yield-252/arch/sparc64/kernel/process.c
--- linux-2.5.2/arch/sparc64/kernel/process.c	Tue Jan 15 08:19:50 2002
+++ linux-yield-252/arch/sparc64/kernel/process.c	Tue Jan 15 08:40:37 2002
@@ -61,7 +61,7 @@
 		 * But this requires writing back the contents of the
 		 * L2 cache etc. so implement this later. -DaveM
 		 */
-		while (!current->need_resched)
+		while (!need_yield())
 			barrier();
 
 		schedule();
@@ -80,7 +80,7 @@
 int cpu_idle(void)
 {
 	while(1) {
-		if (current->need_resched != 0) {
+		if (need_yield()) {
 			unidle_me();
 			schedule();
 			check_pgt_cache();
diff -uNr linux-2.5.2/drivers/char/lp.c linux-yield-252/drivers/char/lp.c
--- linux-2.5.2/drivers/char/lp.c	Tue Jan 15 08:19:50 2002
+++ linux-yield-252/drivers/char/lp.c	Tue Jan 15 08:40:37 2002
@@ -367,7 +367,7 @@
 			  = lp_negotiate (port, 
 					  lp_table[minor].best_mode);
 
-		} else if (current->need_resched)
+		} else if (need_yield())
 			schedule ();
 
 		if (count) {
diff -uNr linux-2.5.2/drivers/char/mem.c linux-yield-252/drivers/char/mem.c
--- linux-2.5.2/drivers/char/mem.c	Tue Jan 15 08:19:50 2002
+++ linux-yield-252/drivers/char/mem.c	Tue Jan 15 08:40:37 2002
@@ -381,8 +381,7 @@
 		unsigned long unwritten = clear_user(buf, PAGE_SIZE);
 		if (unwritten)
 			return size + unwritten - PAGE_SIZE;
-		if (current->need_resched)
-			schedule();
+		yield_point();
 		buf += PAGE_SIZE;
 		size -= PAGE_SIZE;
 	} while (size);
diff -uNr linux-2.5.2/drivers/char/mwave/3780i.c linux-yield-252/drivers/char/mwave/3780i.c
--- linux-2.5.2/drivers/char/mwave/3780i.c	Tue Jan 15 08:16:25 2002
+++ linux-yield-252/drivers/char/mwave/3780i.c	Tue Jan 15 08:40:37 2002
@@ -68,11 +68,9 @@
 
 static void PaceMsaAccess(unsigned short usDspBaseIO)
 {
-	if(current->need_resched)
-		schedule();
+	yield_point();
 	udelay(100);
-	if(current->need_resched)
-		schedule();
+	yield_point();
 }
 
 unsigned short dsp3780I_ReadMsaCfg(unsigned short usDspBaseIO,
diff -uNr linux-2.5.2/drivers/char/ppdev.c linux-yield-252/drivers/char/ppdev.c
--- linux-2.5.2/drivers/char/ppdev.c	Tue Jan 15 08:19:50 2002
+++ linux-yield-252/drivers/char/ppdev.c	Tue Jan 15 08:40:37 2002
@@ -170,9 +170,7 @@
 			break;
 		}
 
-		if (current->need_resched) {
-			schedule ();
-		}
+		yield_point();
 	}
 
 	kfree (kbuffer);
@@ -242,9 +240,7 @@
 			break;
 		}
 
-		if (current->need_resched) {
-			schedule ();
-		}
+		yield_point();
 	}
 
 	kfree (kbuffer);
diff -uNr linux-2.5.2/drivers/char/random.c linux-yield-252/drivers/char/random.c
--- linux-2.5.2/drivers/char/random.c	Tue Jan 15 08:16:22 2002
+++ linux-yield-252/drivers/char/random.c	Tue Jan 15 08:40:37 2002
@@ -1313,7 +1313,7 @@
 		/*
 		 * Check if we need to break out or reschedule....
 		 */
-		if ((flags & EXTRACT_ENTROPY_USER) && current->need_resched) {
+		if ((flags & EXTRACT_ENTROPY_USER) && need_yield()) {
 			if (signal_pending(current)) {
 				if (ret == 0)
 					ret = -ERESTARTSYS;
diff -uNr linux-2.5.2/drivers/char/tty_io.c linux-yield-252/drivers/char/tty_io.c
--- linux-2.5.2/drivers/char/tty_io.c	Tue Jan 15 08:19:51 2002
+++ linux-yield-252/drivers/char/tty_io.c	Tue Jan 15 08:40:37 2002
@@ -712,8 +712,7 @@
 			ret = -ERESTARTSYS;
 			if (signal_pending(current))
 				break;
-			if (current->need_resched)
-				schedule();
+			yield_point();
 		}
 	}
 	if (written) {
diff -uNr linux-2.5.2/drivers/i2c/i2c-algo-bit.c linux-yield-252/drivers/i2c/i2c-algo-bit.c
--- linux-2.5.2/drivers/i2c/i2c-algo-bit.c	Tue Jan 15 08:16:44 2002
+++ linux-yield-252/drivers/i2c/i2c-algo-bit.c	Tue Jan 15 08:40:37 2002
@@ -50,7 +50,7 @@
 /* might not like this, as they have an internal timeout of some mils	*/
 /*
 #define SLO_IO      jif=jiffies;while(jiffies<=jif+i2c_table[minor].veryslow)\
-                        if (need_resched) schedule();
+                        yield_point();
 */
 
 
@@ -120,8 +120,7 @@
 		if (start+adap->timeout <= jiffies) {
 			return -ETIMEDOUT;
 		}
-		if (current->need_resched)
-			schedule();
+		yield_point();
 	}
 	DEBSTAT(printk("needed %ld jiffies\n", jiffies-start));
 #ifdef SLO_IO
diff -uNr linux-2.5.2/drivers/i2c/i2c-algo-ite.c linux-yield-252/drivers/i2c/i2c-algo-ite.c
--- linux-2.5.2/drivers/i2c/i2c-algo-ite.c	Tue Jan 15 08:16:44 2002
+++ linux-yield-252/drivers/i2c/i2c-algo-ite.c	Tue Jan 15 08:40:37 2002
@@ -67,7 +67,7 @@
 /* might not like this, as they have an internal timeout of some mils	*/
 /*
 #define SLO_IO      jif=jiffies;while(jiffies<=jif+i2c_table[minor].veryslow)\
-                        if (need_resched) schedule();
+                        yield_point();
 */
 
 
diff -uNr linux-2.5.2/drivers/md/md.c linux-yield-252/drivers/md/md.c
--- linux-2.5.2/drivers/md/md.c	Tue Jan 15 08:19:51 2002
+++ linux-yield-252/drivers/md/md.c	Tue Jan 15 08:40:37 2002
@@ -3458,8 +3458,7 @@
 		 * about not overloading the IO subsystem. (things like an
 		 * e2fsck being done on the RAID array should execute fast)
 		 */
-		if (current->need_resched)
-			schedule();
+		yield_point();
 
 		currspeed = (j-mddev->resync_mark_cnt)/2/((jiffies-mddev->resync_mark)/HZ +1) +1;
 
diff -uNr linux-2.5.2/drivers/media/radio/radio-sf16fmi.c linux-yield-252/drivers/media/radio/radio-sf16fmi.c
--- linux-2.5.2/drivers/media/radio/radio-sf16fmi.c	Tue Jan 15 08:16:46 2002
+++ linux-yield-252/drivers/media/radio/radio-sf16fmi.c	Tue Jan 15 08:40:37 2002
@@ -94,8 +94,7 @@
 	for(i=0; i< 100; i++)
 	{
 		udelay(1400);
-		if(current->need_resched)
-			schedule();
+		yield_point();
 	}
 /* If this becomes allowed use it ... 	
 	current->state = TASK_UNINTERRUPTIBLE;
@@ -121,8 +120,7 @@
 	for(i=0; i< 100; i++)
 	{
 		udelay(1400);
-		if(current->need_resched)
-			schedule();
+		yield_point();
 	}
 /* If this becomes allowed use it ... 	
 	current->state = TASK_UNINTERRUPTIBLE;
diff -uNr linux-2.5.2/drivers/media/video/c-qcam.c linux-yield-252/drivers/media/video/c-qcam.c
--- linux-2.5.2/drivers/media/video/c-qcam.c	Tue Jan 15 08:16:46 2002
+++ linux-yield-252/drivers/media/video/c-qcam.c	Tue Jan 15 08:40:37 2002
@@ -425,8 +425,7 @@
 		wantlen -= t;
 		if (t < s)
 			break;
-		if (current->need_resched)
-			schedule();
+		yield_point();
 	}
 
 	len = outptr;
@@ -445,8 +444,7 @@
 		int l;
 		do {
 			l = qcam_read_bytes(q, tmpbuf, 3);
-			if (current->need_resched)
-				schedule();
+			yield_point();
 		} while (l && (tmpbuf[0] == 0x7e || tmpbuf[1] == 0x7e || tmpbuf[2] == 0x7e));
 		if (force_rgb) {
 			if (tmpbuf[0] != 0xe || tmpbuf[1] != 0x0 || tmpbuf[2] != 0xf)
@@ -478,8 +476,7 @@
 		int l;
 		do {
 			l = qcam_read_bytes(q, tmpbuf, 1);
-			if (current->need_resched)
-				schedule();
+			yield_point();
 		} while (l && tmpbuf[0] == 0x7e);
 		l = qcam_read_bytes(q, tmpbuf+1, 2);
 		if (force_rgb) {
diff -uNr linux-2.5.2/drivers/media/video/cpia.c linux-yield-252/drivers/media/video/cpia.c
--- linux-2.5.2/drivers/media/video/cpia.c	Tue Jan 15 08:19:51 2002
+++ linux-yield-252/drivers/media/video/cpia.c	Tue Jan 15 08:40:37 2002
@@ -2147,8 +2147,7 @@
 			/* loop until image ready */
 			do_command(cam, CPIA_COMMAND_GetCameraStatus,0,0,0,0);
 			while (cam->params.status.streamState != STREAM_READY) {
-				if (current->need_resched)
-					schedule();
+				yield_point();
 
 				current->state = TASK_INTERRUPTIBLE;
 
@@ -2163,8 +2162,7 @@
 		}
 
 		/* grab image from camera */
-		if (current->need_resched)
-			schedule();
+		yield_point();
 
 		oldjif = jiffies;
 		image_size = cam->ops->streamRead(cam->lowlevel_data,
@@ -2189,8 +2187,7 @@
 		/* decompress and convert image to by copying it from
 		 * raw_image to decompressed_frame
 		 */
-		if (current->need_resched)
-			schedule();
+		yield_point();
 
 		cam->image_size = parse_picture(cam, image_size);
 		if (cam->image_size <= 0)
diff -uNr linux-2.5.2/drivers/media/video/cpia_pp.c linux-yield-252/drivers/media/video/cpia_pp.c
--- linux-2.5.2/drivers/media/video/cpia_pp.c	Tue Jan 15 08:16:46 2002
+++ linux-yield-252/drivers/media/video/cpia_pp.c	Tue Jan 15 08:40:37 2002
@@ -392,7 +392,7 @@
 	endseen = 0;
 	block_size = PARPORT_CHUNK_SIZE;
 	while( !cam->image_complete ) {
-		if(current->need_resched)  schedule();
+		yield_point();
 		
 		new_bytes = cpia_pp_read(cam->port, buffer, block_size );
 		if( new_bytes <= 0 ) {
diff -uNr linux-2.5.2/drivers/media/video/saa5249.c linux-yield-252/drivers/media/video/saa5249.c
--- linux-2.5.2/drivers/media/video/saa5249.c	Tue Jan 15 08:16:46 2002
+++ linux-yield-252/drivers/media/video/saa5249.c	Tue Jan 15 08:40:37 2002
@@ -127,11 +127,7 @@
 #define MAX(a, b) ((a) > (b) ? (a) : (b))
 #endif
 
-#define RESCHED \
-        do { \
-          if (current->need_resched) \
-            schedule(); \
-        } while (0)
+#define RESCHED do { yield_point(); } while(0)
 
 static struct video_device saa_template;	/* Declared near bottom */
 
diff -uNr linux-2.5.2/drivers/mtd/chips/amd_flash.c linux-yield-252/drivers/mtd/chips/amd_flash.c
--- linux-2.5.2/drivers/mtd/chips/amd_flash.c	Tue Jan 15 08:16:46 2002
+++ linux-yield-252/drivers/mtd/chips/amd_flash.c	Tue Jan 15 08:40:37 2002
@@ -889,7 +889,7 @@
 
 	times_left = 500000;
 	while (times_left-- && flash_is_busy(map, adr, private->interleave)) { 
-		if (current->need_resched) {
+		if (need_yield()) {
 			spin_unlock_bh(chip->mutex);
 			schedule();
 			spin_lock_bh(chip->mutex);
@@ -1126,7 +1126,7 @@
 		/* Latency issues. Drop the lock, wait a while and retry */
 		spin_unlock_bh(chip->mutex);
 
-		if (current->need_resched)
+		if (need_yield())
 			schedule();
 		else
 			udelay(1);
diff -uNr linux-2.5.2/drivers/mtd/devices/doc2000.c linux-yield-252/drivers/mtd/devices/doc2000.c
--- linux-2.5.2/drivers/mtd/devices/doc2000.c	Tue Jan 15 08:16:46 2002
+++ linux-yield-252/drivers/mtd/devices/doc2000.c	Tue Jan 15 08:40:37 2002
@@ -97,7 +97,7 @@
 			DEBUG(MTD_DEBUG_LEVEL2, "_DoC_WaitReady timed out.\n");
 			return -EIO;
 		}
-		if (current->need_resched) {
+		if (need_yield()) {
 			set_current_state(TASK_UNINTERRUPTIBLE);
 			schedule_timeout(1);
 		}
diff -uNr linux-2.5.2/drivers/parport/ieee1284.c linux-yield-252/drivers/parport/ieee1284.c
--- linux-2.5.2/drivers/parport/ieee1284.c	Tue Jan 15 08:16:44 2002
+++ linux-yield-252/drivers/parport/ieee1284.c	Tue Jan 15 08:40:37 2002
@@ -128,7 +128,7 @@
 			return 0;
 		if (signal_pending (current))
 			return -EINTR;
-		if (current->need_resched)
+		if (need_yield())
 			break;
 		if (i >= 2)
 			udelay (5);
diff -uNr linux-2.5.2/drivers/parport/ieee1284_ops.c linux-yield-252/drivers/parport/ieee1284_ops.c
--- linux-2.5.2/drivers/parport/ieee1284_ops.c	Tue Jan 15 08:16:43 2002
+++ linux-yield-252/drivers/parport/ieee1284_ops.c	Tue Jan 15 08:40:37 2002
@@ -136,7 +136,7 @@
                 /* Let another process run if it needs to. */
 		if (time_before (jiffies, expire))
 			if (!parport_yield_blocking (dev)
-			    && current->need_resched)
+			    && need_yield())
 				schedule ();
 	}
  stop:
diff -uNr linux-2.5.2/drivers/parport/parport_pc.c linux-yield-252/drivers/parport/parport_pc.c
--- linux-2.5.2/drivers/parport/parport_pc.c	Tue Jan 15 08:16:43 2002
+++ linux-yield-252/drivers/parport/parport_pc.c	Tue Jan 15 08:40:37 2002
@@ -596,7 +596,7 @@
 		unsigned char ecrval = inb (ECONTROL (port));
 		int i = 0;
 
-		if (current->need_resched && time_before (jiffies, expire))
+		if (need_yield() && time_before (jiffies, expire))
 			/* Can't yield the port. */
 			schedule ();
 
@@ -622,7 +622,7 @@
 			}
 			ecrval = inb (ECONTROL (port));
 			if (!(ecrval & (1<<2))) {
-				if (current->need_resched &&
+				if (need_yield() &&
 				    time_before (jiffies, expire))
 					schedule ();
 
@@ -746,8 +746,7 @@
 		}
 		/* Is serviceIntr set? */
 		if (!(inb (ECONTROL (port)) & (1<<2))) {
-			if (current->need_resched)
-				schedule ();
+			yield_point();
 
 			goto false_alarm;
 		}
@@ -758,9 +757,7 @@
 		count = get_dma_residue(port->dma);
 		release_dma_lock(dmaflag);
 
-		if (current->need_resched)
-			/* Can't yield the port. */
-			schedule ();
+		yield_point(); /* Can't yield the port. */
 
 		/* Anyone else waiting for the port? */
 		if (port->waithead) {
@@ -1093,7 +1090,7 @@
 		long int expire = jiffies + port->cad->timeout;
 		unsigned char ecrval = inb (ECONTROL (port));
 
-		if (current->need_resched && time_before (jiffies, expire))
+		if (need_yield() && time_before (jiffies, expire))
 			/* Can't yield the port. */
 			schedule ();
 
@@ -1130,7 +1127,7 @@
 			}
 			ecrval = inb (ECONTROL (port));
 			if (!(ecrval & (1<<2))) {
-				if (current->need_resched &&
+				if (need_yield() &&
 				    time_before (jiffies, expire)) {
 					schedule ();
 				}
diff -uNr linux-2.5.2/drivers/sound/via82cxxx_audio.c linux-yield-252/drivers/sound/via82cxxx_audio.c
--- linux-2.5.2/drivers/sound/via82cxxx_audio.c	Tue Jan 15 08:16:34 2002
+++ linux-yield-252/drivers/sound/via82cxxx_audio.c	Tue Jan 15 08:40:37 2002
@@ -1995,7 +1995,7 @@
 	/* just to be a nice neighbor */
 	/* Thomas Sailer:
 	 * But also to ourselves, release semaphore if we do so */
-	if (current->need_resched) {
+	if (need_yield()) {
 		up(&card->syscall_sem);
 		schedule ();
 		ret = via_syscall_down (card, nonblock);
@@ -2171,7 +2171,7 @@
 	/* just to be a nice neighbor */
 	/* Thomas Sailer:
 	 * But also to ourselves, release semaphore if we do so */
-	if (current->need_resched) {
+	if (need_yield()) {
 		up(&card->syscall_sem);
 		schedule ();
 		ret = via_syscall_down (card, nonblock);
diff -uNr linux-2.5.2/fs/jbd/commit.c linux-yield-252/fs/jbd/commit.c
--- linux-2.5.2/fs/jbd/commit.c	Tue Jan 15 08:19:54 2002
+++ linux-yield-252/fs/jbd/commit.c	Tue Jan 15 08:40:37 2002
@@ -224,14 +224,13 @@
 		}
 	} while (jh != last_jh);
 
-	if (bufs || current->need_resched) {
+	if (bufs || need_yield()) {
 		jbd_debug(2, "submit %d writes\n", bufs);
 		spin_unlock(&journal_datalist_lock);
 		unlock_journal(journal);
 		if (bufs)
 			ll_rw_block(WRITE, bufs, wbuf);
-		if (current->need_resched)
-			schedule();
+		yield_point();
 		journal_brelse_array(wbuf, bufs);
 		lock_journal(journal);
 		spin_lock(&journal_datalist_lock);
@@ -458,8 +457,7 @@
 				bh->b_end_io = journal_end_buffer_io_sync;
 				submit_bh(WRITE, bh);
 			}
-			if (current->need_resched)
-				schedule();
+			yield_point();
 			lock_journal(journal);
 
 			/* Force a new descriptor to be generated next
diff -uNr linux-2.5.2/fs/jffs2/background.c linux-yield-252/fs/jffs2/background.c
--- linux-2.5.2/fs/jffs2/background.c	Tue Jan 15 08:19:55 2002
+++ linux-yield-252/fs/jffs2/background.c	Tue Jan 15 08:40:37 2002
@@ -127,8 +127,7 @@
 			schedule();
 		}
                 
-		if (current->need_resched)
-			schedule();
+		yield_point();
 
                 /* Put_super will send a SIGKILL and then wait on the sem. 
                  */
diff -uNr linux-2.5.2/fs/jffs2/erase.c linux-yield-252/fs/jffs2/erase.c
--- linux-2.5.2/fs/jffs2/erase.c	Tue Jan 15 08:19:55 2002
+++ linux-yield-252/fs/jffs2/erase.c	Tue Jan 15 08:40:37 2002
@@ -131,8 +131,7 @@
 		
 		jffs2_erase_block(c, jeb);
 		/* Be nice */
-		if (current->need_resched)
-			schedule();
+		yield_point();
 		spin_lock_bh(&c->erase_completion_lock);
 	}
 	spin_unlock_bh(&c->erase_completion_lock);
diff -uNr linux-2.5.2/fs/jffs2/nodemgmt.c linux-yield-252/fs/jffs2/nodemgmt.c
--- linux-2.5.2/fs/jffs2/nodemgmt.c	Tue Jan 15 08:16:02 2002
+++ linux-yield-252/fs/jffs2/nodemgmt.c	Tue Jan 15 08:40:37 2002
@@ -101,8 +101,7 @@
 			if (ret)
 				return ret;
 
-			if (current->need_resched)
-				schedule();
+			yield_point();
 
 			if (signal_pending(current))
 				return -EINTR;
diff -uNr linux-2.5.2/fs/namei.c linux-yield-252/fs/namei.c
--- linux-2.5.2/fs/namei.c	Tue Jan 15 08:19:55 2002
+++ linux-yield-252/fs/namei.c	Tue Jan 15 08:40:37 2002
@@ -339,7 +339,7 @@
 		goto loop;
 	if (current->total_link_count >= 40)
 		goto loop;
-	if (current->need_resched) {
+	if (need_yield()) {
 		current->state = TASK_RUNNING;
 		schedule();
 	}
diff -uNr linux-2.5.2/fs/reiserfs/inode.c linux-yield-252/fs/reiserfs/inode.c
--- linux-2.5.2/fs/reiserfs/inode.c	Tue Jan 15 08:19:55 2002
+++ linux-yield-252/fs/reiserfs/inode.c	Tue Jan 15 08:40:37 2002
@@ -808,8 +808,7 @@
 	/* inserting indirect pointers for a hole can take a 
 	** long time.  reschedule if needed
 	*/
-	if (current->need_resched)
-	    schedule() ;
+	yield_point();
 
 	retval = search_for_position_by_key (inode->i_sb, &key, &path);
 	if (retval == IO_ERROR) {
diff -uNr linux-2.5.2/include/asm-arm/arch-arc/system.h linux-yield-252/include/asm-arm/arch-arc/system.h
--- linux-2.5.2/include/asm-arm/arch-arc/system.h	Tue Jan 15 08:16:07 2002
+++ linux-yield-252/include/asm-arm/arch-arc/system.h	Tue Jan 15 08:40:37 2002
@@ -10,7 +10,7 @@
 
 static void arch_idle(void)
 {
-	while (!current->need_resched && !hlt_counter);
+	while (!need_yield() && !hlt_counter);
 }
 
 static inline void arch_reset(char mode)
diff -uNr linux-2.5.2/include/asm-arm/arch-cl7500/system.h linux-yield-252/include/asm-arm/arch-cl7500/system.h
--- linux-2.5.2/include/asm-arm/arch-cl7500/system.h	Tue Jan 15 08:16:07 2002
+++ linux-yield-252/include/asm-arm/arch-cl7500/system.h	Tue Jan 15 08:40:37 2002
@@ -10,7 +10,7 @@
 
 static void arch_idle(void)
 {
-	while (!current->need_resched && !hlt_counter)
+	while (!need_yield() && !hlt_counter)
 		iomd_writeb(0, IOMD_SUSMODE);
 }
 
diff -uNr linux-2.5.2/include/asm-arm/arch-ebsa110/system.h linux-yield-252/include/asm-arm/arch-ebsa110/system.h
--- linux-2.5.2/include/asm-arm/arch-ebsa110/system.h	Tue Jan 15 08:16:07 2002
+++ linux-yield-252/include/asm-arm/arch-ebsa110/system.h	Tue Jan 15 08:40:37 2002
@@ -17,7 +17,7 @@
  * will stop our MCLK signal (which provides the clock for the glue
  * logic, and therefore the timer interrupt).
  *
- * Instead, we spin, waiting for either hlt_counter or need_resched
+ * Instead, we spin, waiting for either hlt_counter or need_yield()
  * to be set.  If we have been spinning for 2cs, then we drop the
  * core clock down to the memory clock.
  */
@@ -28,13 +28,13 @@
 	start_idle = jiffies;
 
 	do {
-		if (current->need_resched || hlt_counter)
+		if (need_yield() || hlt_counter)
 			goto slow_out;
 	} while (time_before(jiffies, start_idle + HZ/50));
 
 	cpu_do_idle(IDLE_CLOCK_SLOW);
 
-	while (!current->need_resched && !hlt_counter) {
+	while (!need_yield() && !hlt_counter) {
 		/* do nothing slowly */
 	}
 
diff -uNr linux-2.5.2/include/asm-arm/arch-ebsa285/system.h linux-yield-252/include/asm-arm/arch-ebsa285/system.h
--- linux-2.5.2/include/asm-arm/arch-ebsa285/system.h	Tue Jan 15 08:16:07 2002
+++ linux-yield-252/include/asm-arm/arch-ebsa285/system.h	Tue Jan 15 08:40:37 2002
@@ -20,14 +20,14 @@
 	start_idle = jiffies;
 
 	do {
-		if (current->need_resched || hlt_counter)
+		if (need_yield() || hlt_counter)
 			goto slow_out;
 		cpu_do_idle(IDLE_WAIT_FAST);
 	} while (time_before(jiffies, start_idle + HZ/50));
 
 	cpu_do_idle(IDLE_CLOCK_SLOW);
 
-	while (!current->need_resched && !hlt_counter) {
+	while (!need_yield() && !hlt_counter) {
 		cpu_do_idle(IDLE_WAIT_SLOW);
 	}
 
diff -uNr linux-2.5.2/include/asm-arm/arch-nexuspci/system.h linux-yield-252/include/asm-arm/arch-nexuspci/system.h
--- linux-2.5.2/include/asm-arm/arch-nexuspci/system.h	Tue Jan 15 08:16:07 2002
+++ linux-yield-252/include/asm-arm/arch-nexuspci/system.h	Tue Jan 15 08:40:37 2002
@@ -16,7 +16,7 @@
 
 static void arch_idle(void)
 {
-	while (!current->need_resched && !hlt_counter)
+	while (!need_yield() && !hlt_counter)
 		cpu_do_idle(IDLE_WAIT_SLOW);
 }
 
diff -uNr linux-2.5.2/include/asm-arm/arch-rpc/system.h linux-yield-252/include/asm-arm/arch-rpc/system.h
--- linux-2.5.2/include/asm-arm/arch-rpc/system.h	Tue Jan 15 08:16:07 2002
+++ linux-yield-252/include/asm-arm/arch-rpc/system.h	Tue Jan 15 08:40:37 2002
@@ -18,14 +18,14 @@
 	start_idle = jiffies;
 
 	do {
-		if (current->need_resched || hlt_counter)
+		if (need_yield() || hlt_counter)
 			goto slow_out;
 		cpu_do_idle(IDLE_WAIT_FAST);
 	} while (time_before(jiffies, start_idle + HZ/50));
 
 	cpu_do_idle(IDLE_CLOCK_SLOW);
 
-	while (!current->need_resched && !hlt_counter) {
+	while (!need_yield() && !hlt_counter) {
 		cpu_do_idle(IDLE_WAIT_SLOW);
 	}
 
diff -uNr linux-2.5.2/include/asm-arm/arch-sa1100/system.h linux-yield-252/include/asm-arm/arch-sa1100/system.h
--- linux-2.5.2/include/asm-arm/arch-sa1100/system.h	Tue Jan 15 08:16:07 2002
+++ linux-yield-252/include/asm-arm/arch-sa1100/system.h	Tue Jan 15 08:40:37 2002
@@ -10,7 +10,7 @@
 	if (!hlt_counter) {
 		int flags;
 		local_irq_save(flags);
-		if (!current->need_resched)
+		if (!need_yield())
 			cpu_do_idle(0);
 		local_irq_restore(flags);
 	}
diff -uNr linux-2.5.2/include/asm-arm/arch-tbox/system.h linux-yield-252/include/asm-arm/arch-tbox/system.h
--- linux-2.5.2/include/asm-arm/arch-tbox/system.h	Tue Jan 15 08:16:07 2002
+++ linux-yield-252/include/asm-arm/arch-tbox/system.h	Tue Jan 15 08:40:37 2002
@@ -13,14 +13,14 @@
 	start_idle = jiffies;
 
 	do {
-		if (current->need_resched || hlt_counter)
+		if (need_yield() || hlt_counter)
 			goto slow_out;
 		cpu_do_idle(IDLE_WAIT_FAST);
 	} while (time_before(jiffies, start_idle + HZ/50));
 
 	cpu_do_idle(IDLE_CLOCK_SLOW);
 
-	while (!current->need_resched && !hlt_counter) {
+	while (!need_yield() && !hlt_counter) {
 		cpu_do_idle(IDLE_WAIT_SLOW);
 	}
 
diff -uNr linux-2.5.2/include/linux/mtd/cfi.h linux-yield-252/include/linux/mtd/cfi.h
--- linux-2.5.2/include/linux/mtd/cfi.h	Tue Jan 15 08:16:03 2002
+++ linux-yield-252/include/linux/mtd/cfi.h	Tue Jan 15 08:40:37 2002
@@ -368,7 +368,7 @@
 static inline void cfi_udelay(int us)
 {
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,2,0)
-	if (current->need_resched) {
+	if (need_yield()) {
 		unsigned long t = us * HZ / 1000000;
 		if (t < 1)
 			t = 1;
diff -uNr linux-2.5.2/include/linux/sched.h linux-yield-252/include/linux/sched.h
--- linux-2.5.2/include/linux/sched.h	Tue Jan 15 08:19:56 2002
+++ linux-yield-252/include/linux/sched.h	Tue Jan 15 08:45:38 2002
@@ -25,6 +25,7 @@
 #include <linux/signal.h>
 #include <linux/securebits.h>
 #include <linux/fs_struct.h>
+#include <linux/compiler.h>
 
 struct exec_domain;
 
@@ -669,6 +670,17 @@
 {
 	return (p->sigpending != 0);
 }
+  
+static inline int need_yield(void)
+{
+	return unlikely(current->need_resched != 0);
+}
+
+static inline void yield_point(void)
+{
+	if (need_yield())
+		schedule();
+}
 
 /*
  * Re-calculate pending state from the set of locally pending
diff -uNr linux-2.5.2/kernel/printk.c linux-yield-252/kernel/printk.c
--- linux-2.5.2/kernel/printk.c	Tue Jan 15 08:19:57 2002
+++ linux-yield-252/kernel/printk.c	Tue Jan 15 08:40:37 2002
@@ -524,7 +524,7 @@
  */
 void console_conditional_schedule(void)
 {
-	if (console_may_schedule && current->need_resched) {
+	if (console_may_schedule && need_yield()) {
 		set_current_state(TASK_RUNNING);
 		schedule();
 	}
diff -uNr linux-2.5.2/kernel/sched.c linux-yield-252/kernel/sched.c
--- linux-2.5.2/kernel/sched.c	Tue Jan 15 08:19:57 2002
+++ linux-yield-252/kernel/sched.c	Tue Jan 15 08:40:37 2002
@@ -531,7 +531,7 @@
 	spin_unlock_irq(&rq->lock);
 
 	reacquire_kernel_lock(current);
-	if (unlikely(current->need_resched))
+	if (need_yield())
 		goto need_resched_back;
 	return;
 }
diff -uNr linux-2.5.2/kernel/softirq.c linux-yield-252/kernel/softirq.c
--- linux-2.5.2/kernel/softirq.c	Tue Jan 15 08:19:57 2002
+++ linux-yield-252/kernel/softirq.c	Tue Jan 15 08:40:37 2002
@@ -387,8 +387,7 @@
 
 		while (softirq_pending(cpu)) {
 			do_softirq();
-			if (current->need_resched)
-				schedule();
+			yield_point();
 		}
 
 		__set_current_state(TASK_INTERRUPTIBLE);
diff -uNr linux-2.5.2/mm/filemap.c linux-yield-252/mm/filemap.c
--- linux-2.5.2/mm/filemap.c	Tue Jan 15 08:19:57 2002
+++ linux-yield-252/mm/filemap.c	Tue Jan 15 08:40:37 2002
@@ -290,7 +290,7 @@
 
 			page_cache_release(page);
 
-			if (current->need_resched) {
+			if (need_yield()) {
 				__set_current_state(TASK_RUNNING);
 				schedule();
 			}
@@ -400,7 +400,7 @@
 		}
 
 		page_cache_release(page);
-		if (current->need_resched) {
+		if (need_yield()) {
 			__set_current_state(TASK_RUNNING);
 			schedule();
 		}
diff -uNr linux-2.5.2/mm/swapfile.c linux-yield-252/mm/swapfile.c
--- linux-2.5.2/mm/swapfile.c	Tue Jan 15 08:19:57 2002
+++ linux-yield-252/mm/swapfile.c	Tue Jan 15 08:40:37 2002
@@ -696,7 +696,7 @@
 		 * interactive performance.  Interruptible check on
 		 * signal_pending() would be nice, but changes the spec?
 		 */
-		if (current->need_resched)
+		if (need_yield())
 			schedule();
 	}
 
diff -uNr linux-2.5.2/mm/vmscan.c linux-yield-252/mm/vmscan.c
--- linux-2.5.2/mm/vmscan.c	Tue Jan 15 08:19:57 2002
+++ linux-yield-252/mm/vmscan.c	Tue Jan 15 08:40:37 2002
@@ -300,7 +300,7 @@
 
 	counter = mmlist_nr;
 	do {
-		if (unlikely(current->need_resched)) {
+		if (need_yield()) {
 			__set_current_state(TASK_RUNNING);
 			schedule();
 		}
@@ -345,7 +345,7 @@
 	while (--max_scan >= 0 && (entry = inactive_list.prev) != &inactive_list) {
 		struct page * page;
 
-		if (unlikely(current->need_resched)) {
+		if (need_yield()) {
 			spin_unlock(&pagemap_lru_lock);
 			__set_current_state(TASK_RUNNING);
 			schedule();
@@ -625,8 +625,7 @@
 
 	for (i = pgdat->nr_zones-1; i >= 0; i--) {
 		zone = pgdat->node_zones + i;
-		if (unlikely(current->need_resched))
-			schedule();
+		yield_point();
 		if (!zone->need_balance)
 			continue;
 		if (!try_to_free_pages(zone, GFP_KSWAPD, 0)) {
diff -uNr linux-2.5.2/net/sunrpc/sched.c linux-yield-252/net/sunrpc/sched.c
--- linux-2.5.2/net/sunrpc/sched.c	Tue Jan 15 08:19:57 2002
+++ linux-yield-252/net/sunrpc/sched.c	Tue Jan 15 08:40:37 2002
@@ -721,7 +721,7 @@
 
 		__rpc_execute(task);
 
-		if (++count >= 200 || current->need_resched) {
+		if (++count >= 200 || need_yield()) {
 			count = 0;
 			schedule();
 		}

^ permalink raw reply

* Re: [linux-lvm] Re: GRUB + LVM + XFS?
From: Adrian Head @ 2002-01-15  9:17 UTC (permalink / raw)
  To: linux-lvm, Heinz J . Mauelshagen
In-Reply-To: <20020115151829.F11005@sistina.com>

On Wed, 16 Jan 2002 00:18, Heinz J . Mauelshagen wrote:
> > From my experience it seems that LVM 1.0.1rc4(ish) is way more robust
> > than the updated LVM 1.0.1 or even CVS LVM 1.0.1 yesterday.
>
> Do you have some input which particular changes cause it?
> Thanks.
>
The issue was that when I tried to create an XFS snapshot it would Oops and 
the snapshot creation would not have been completed.  The /dev/vg/lv entries 
would not be there; however, vgdisplay would show the snapshot as being in 
use but I could not remove the incomplete snapshot.

When I would reboot using a lvm-1.0.1 kernel (2.4.17-xfs+lvm1.0.1) - the 
machine would hang during startup; however, if I used a lvm-1.0.1rc4(ish) 
kernel (2.4.16-xfs+lvm1.0.1rc4) it would fix the problem on the fly during 
bootup and the snapshot would be put in full operation without problems.  
This was the only way I found to get the machine up & running again.

I don't have any info on which lines of code might have been the cause.  I'm 
still learning how to dig in and dbug.  ;-)

-- 
Adrian Head

(Public Key available on request.)

^ permalink raw reply

* Re: [linux-lvm] Problems binding raw devices to PV's
From: Heinz J . Mauelshagen @ 2002-01-15  9:17 UTC (permalink / raw)
  To: linux-lvm
In-Reply-To: <200112202016.fBKKGqI18345@lvadp.fc.hp.com>

Andrew,
happy new year and sorry for this late answer.

On Thu, Dec 20, 2001 at 01:16:52PM -0700, Andrew Patterson wrote:
> In your message on you write:
> > 
> > Hi Andrew,
> > 
> > I admit that the oops shouldn't happen but what's the use of binding
> > raw devices to PVs anyway?
> 
> We are using this feature to monitor LUN's in a volume group to decide
> whether to fail-over a server in a high-availabilty solution.  We try
> and read the PV header on a LUN to see if it has failed. To do this we
> need raw access to bypass the buffer cache.  Is there another way to
> bypass the buffer-cache without using raw?

No, not that I am aware of.

Heinz

> 
> Andrew
> 
> > 
> > Regards,
> > Heinz
> > 
> > On Wed, Dec 19, 2001 at 05:54:12PM -0700, Andrew Patterson wrote:
> > > 
> > > We are having problems when running vgchange to activate volume groups
> > > that have raw devices bound to it's PV's. We are currently using
> > > LVM 1.0.1-rc4 running on Linux kernel 2.4.14. 
> > > 
> > > Andrew
> > > 
> > > Reproducing problem:
> > > --------------------
> > > 1. Establish raw device <--> scsi disk device bindings using raw
> > >    utility
> > > 2. Create 1 vg with 2 pv's (problem not seen with only 1 pv)
> > > 3. Deactivate vg with vgchange
> > > 4. When you re-activate the vg with vgchange, something is corrupted
> > >    such that the raw mappings appear to have been changed.
> > > 5. The next attempt to change back the raw binding causes segfault in
> > >    the raw utility, accompanied by a kernel stack trace on the
> > >    console/syslog
> > > 6. The next attempt to change back the raw binding causes the system
> > >    to completely lock up/wedge.
> > > 
> > > Capture showing problem:
> > > ------------------------
> > > jerry# 
> > > jerry# 
> > > jerry# raw /dev/raw2 8 16
> > > /dev/raw/raw2:	bound to major 8, minor 16
> > > jerry# raw /dev/raw3 8 32
> > > /dev/raw/raw3:	bound to major 8, minor 32
> > > jerry# raw /dev/raw3 8 48
> > > /dev/raw/raw4:	bound to major 8, minor 48
> > > jerry# raw /dev/raw4 8 64
> > > /dev/raw/raw5:	bound to major 8, minor 64
> > > jerry# raw /dev/raw5 8 80
> > > /dev/raw/raw6:	bound to major 8, minor 80
> > > jerry# raw /dev/raw6 8 96
> > > /dev/raw/raw7:	bound to major 8, minor 96
> > > jerry# raw /dev/raw8 8 112
> > > /dev/raw/raw8:	bound to major 8, minor 112
> > > jerry# raw /dev/raw9 8 128
> > > /dev/raw/raw9:	bound to major 8, minor 128
> > > jerry# 
> > > jerry# 
> > > jerry# raw -qa
> > > /dev/raw/raw2:	bound to major 8, minor 16
> > > /dev/raw/raw3:	bound to major 8, minor 32
> > > /dev/raw/raw4:	bound to major 8, minor 48
> > > /dev/raw/raw5:	bound to major 8, minor 64
> > > /dev/raw/raw6:	bound to major 8, minor 80
> > > /dev/raw/raw7:	bound to major 8, minor 96
> > > /dev/raw/raw8:	bound to major 8, minor 112
> > > /dev/raw/raw9:	bound to major 8, minor 128
> > > jerry# pvcreate /dev/sdf
> > > pvcreate -- physical volume "/dev/sdf" successfully created
> > > 
> > > jerry# pvcreate /dev/sdg
> > > pvcreate -- physical volume "/dev/sdg" successfully created
> > > 
> > > jerry# vgcreate testVG1 /dev/sdf /dev/sdg
> > > vgcreate -- INFO: using default physical extent size 4.00 MB
> > > vgcreate -- INFO: maximum logical volume size is 255.99 Gigabyte
> > > vgcreate -- doing automatic backup of volume group "testVG1"
> > > vgcreate -- volume group "testVG1" successfully created and activated
> > > 
> > > jerry# raw -qa
> > > /dev/raw/raw2:	bound to major 8, minor 16
> > > /dev/raw/raw3:	bound to major 8, minor 32
> > > /dev/raw/raw4:	bound to major 8, minor 48
> > > /dev/raw/raw5:	bound to major 8, minor 64
> > > /dev/raw/raw6:	bound to major 8, minor 80
> > > /dev/raw/raw7:	bound to major 8, minor 96
> > > /dev/raw/raw8:	bound to major 8, minor 112
> > > /dev/raw/raw9:	bound to major 8, minor 128
> > > jerry#
> > > jerry#
> > > jerry# vgchange -an testVG1
> > > vgchange -- volume group "testVG1" successfully deactivated
> > > 
> > > jerry# raw -qa
> > > /dev/raw/raw2:	bound to major 8, minor 16
> > > /dev/raw/raw3:	bound to major 8, minor 32
> > > /dev/raw/raw4:	bound to major 8, minor 48
> > > /dev/raw/raw5:	bound to major 8, minor 64
> > > /dev/raw/raw6:	bound to major 8, minor 80
> > > /dev/raw/raw7:	bound to major 8, minor 96
> > > /dev/raw/raw8:	bound to major 8, minor 112
> > > /dev/raw/raw9:	bound to major 8, minor 128
> > > jerry#
> > > jerry#
> > > jerry# vgchange -ay testVG1
> > > vgchange -- volume group "testVG1" successfully activated
> > > 
> > > jerry# raw -qa
> > > /dev/raw/raw2:	bound to major 8, minor 16
> > > /dev/raw/raw3:	bound to major 8, minor 32
> > > /dev/raw/raw4:	bound to major 8, minor 48
> > > /dev/raw/raw5:	bound to major 8, minor 64
> > > /dev/raw/raw6:	bound to major 8, minor 96      <------ CHANGED/WRONG
> > > /dev/raw/raw7:	bound to major 8, minor 80      <------ CHANGED/WRONG
> > > /dev/raw/raw8:	bound to major 8, minor 112
> > > /dev/raw/raw9:	bound to major 8, minor 128
> > > jerry#
> > > jerry#
> > > jerry# raw /dev/raw6 0 0
> > > Segmentation fault
> > > 
> > > >>>>>>>>>> THIS APPEARED ON CONSOLE/SYSLOG >>>>>>>>>>>>>>>>>>
> > > Dec 19 15:53:32 jerry kernel: invalid operand: 0000
> > > Dec 19 15:53:32 jerry kernel: CPU:    0
> > > Dec 19 15:53:32 jerry kernel: EIP:    0010:[<c01396a2>]    Not tainted
> > > Dec 19 15:53:32 jerry kernel: EFLAGS: 00010202
> > > Dec 19 15:53:32 jerry kernel: eax: 00000001   ebx: 000000d8   ecx: c1e72de8
> >    
> > > edx: 00000001
> > > Dec 19 15:53:32 jerry kernel: esi: c1e72de0   edi: c03f5880   ebp: f2e41f88
> >    
> > > esp: f2e41f60
> > > Dec 19 15:53:32 jerry kernel: ds: 0018   es: 0018   ss: 0018
> > > Dec 19 15:53:32 jerry kernel: Process raw (pid: 506, stackpage=f2e41000)
> > > Dec 19 15:53:32 jerry kernel: Stack: 000000d8 c03f5968 c03f5880 c0207f16 
> > > c1e72de0 f3858d20 bffffcd0 0000ac00
> > > Dec 19 15:53:32 jerry kernel:        ffffffe7 00000000 00000006 00000000 
> > > 00000000 00000000 00000000 c01415a7
> > > Dec 19 15:53:32 jerry kernel:        f638d920 f3858d20 0000ac00 bffffcd0 
> > > f2e40000 bffffde4 bffffd1c 00000004
> > > Dec 19 15:53:32 jerry kernel: Call Trace: [<c0207f16>] [<c01415a7>]
> > > [<c0106d6f>]
> > > Dec 19 15:53:32 jerry kernel:
> > > Dec 19 15:53:32 jerry kernel: Code: 0f 0b 8b 56 04 8b 06 89 50 04 89 02 8b 
> > 5e 
> > > 30 8d 46 30 39 c3
> > > <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
> > > 
> > > jerry#
> > > jerry#
> > > jerry# raw /dev/raw7 8 96
> > > >>>>>>>>>>>> SYSTEM LOCKED-UP COMPLETELY >>>>>>>>>>>>>>>>>>>
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > _______________________________________________
> > > linux-lvm mailing list
> > > linux-lvm@sistina.com
> > > http://lists.sistina.com/mailman/listinfo/linux-lvm
> > > read the LVM HOW-TO at http://www.sistina.com/lvm/Pages/howto.html
> > 
> > linux-lvm mailing list
> > linux-lvm@sistina.com
> > http://lists.sistina.com/mailman/listinfo/linux-lvm
> > read the LVM HOW-TO at http://www.sistina.com/lvm/Pages/howto.html
> 
> 
> 
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@sistina.com
> http://lists.sistina.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://www.sistina.com/lvm/Pages/howto.html

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Heinz Mauelshagen                                 Sistina Software Inc.
Senior Consultant/Developer                       Am Sonnenhang 11
                                                  56242 Marienrachdorf
                                                  Germany
Mauelshagen@Sistina.com                           +49 2626 141200
                                                       FAX 924446
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

^ permalink raw reply

* Re: "Cache Profiler" ? (was: No cache control on ppc??)
From: Elizabeth Barham @ 2002-01-15  9:17 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: debian-powerpc, linuxppc-dev
In-Reply-To: <20020113193619.14166@smtp.wanadoo.fr>


> First boot once with BootX. Once in linux, grab the value of
> /proc/sys/kernel/l2cr. Then, go back to quik, and in your boot
> scripts, write back this value. This is the configuration of the
> backside L2 cache of the 750.

Just a follow-up:

It turns out that Linux was using the 750 processor with it's
configuration (1,0,0,1 [NewerTech G3L2]) but it was not using the
cache at all. In order to grab the parameters of the above-mentioned
file in the /proc/sys/kernel directory I had to install Mac
OS. Fortunatly we had an extra drive available to install it upon.

The configuration that I had been using, though, disabled the cache so
I had to find a better setting that was quicker and stable (0,0,1,0
[240 MHz, 478.41 bogomips]). However, the gotcha! with this is that
quik (v2.0) throws a fatal error prior to the start-screen ("Choose
your kernel").

So, I ended up just keeping MacOS on half of the newly-installed drive
and will use BootX to boot into Linux now and in the future; it's not
*that* inconvenient and the increase in speed is easily worth it.

Thank you all for your help.

Kind regards, Elizabeth

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply

* Re: [2.4.17/18pre] VM and swap - it's really unusable
From: Helge Hafting @ 2002-01-15  9:18 UTC (permalink / raw)
  To: yodaiken; +Cc: linux-kernel
In-Reply-To: <20020114175931.A27147@hq.fsmlabs.com>

yodaiken@fsmlabs.com wrote:
> 
> On Mon, Jan 14, 2002 at 03:21:14PM -0800, george anzinger wrote:
> > > > How is that changed? AFAIK inserting more schedule points does not
> > > > change the behaviour of the scheduler. The niced app will still get its
> > > > time.
> > >
> > > How many times can an app be preempted? In a non preempt kernel
> > > is can be preempted during user mode at timer frequency and no more
> >
> > Uh, it can be and is preempted in user mode by ANY interrupt, be it
> > keyboard, serial, lan, disc, etc.  The kernel looks for need_resched at
> > the end of ALL interrupts, not just the timer interrupt.
> 
> Ouch.

Ouch?  It is supposed to be that way.  Consider:

A high-priority task issues a disk read - and blocks.  Some
lower-priority process gets the cpu.  But then the disk io finishes
way before the low-priority process used up its timeslice.
The kernel gets an interrupt from the disk controller because
of that.  Perhaps the block device issues some more requests,
then time comes to return to user space.  The higher priority task
is now ready to run because its IO completed.  So of course
it is preferred over that low-priority thing.  In other words,
the low-priority task got preempted, this time by a disk
interrupt.

The same thing happens whan high-priority tasks waits for
other kinds of io, such as network, serial, and so on.
I am sure you wouldn't want it any other way.  Not
using the opportunity to switch task immediately after an io
completion interrupt would kill latency completely.

Helge Hafting

^ permalink raw reply

* Re: 2.5.2 / IDE cdrom_read_intr: data underrun / end_request: I/O error
From: Jens Axboe @ 2002-01-15  9:19 UTC (permalink / raw)
  To: David Dyck; +Cc: linux-kernel
In-Reply-To: <Pine.LNX.4.33.0201141938480.214-100000@dd.tc.fluke.com>

On Mon, Jan 14 2002, David Dyck wrote:
> 
> I'm still getting data underrun errors using 2.5.2
> that don't occur using 2.4.18-pre3.

I'll check up on that, mind checking when this happened exactly in the
2.5 series?

-- 
Jens Axboe


^ permalink raw reply

* Re: [2.4.17/18pre] VM and swap - it's really unusable
From: Oliver Neukum @ 2002-01-15  8:32 UTC (permalink / raw)
  To: george anzinger; +Cc: Momchil Velikov, linux-kernel
In-Reply-To: <3C43D5E1.6785695C@mvista.com>

On Tuesday 15 January 2002 08:10, george anzinger wrote:

> Yes, this is classic priority inversion.  It is here now, today with
> semaphors which are held by code that blocks.  If the code doesn't
> block, why not use a spin lock?  If it does, well the problem is here

Because eg. other code that holds the semaphore needs to sleep

> now.  I suppose we could set a preempt disable around a semaphore if it
> makes you feel better.  It doesn't fix the problem if the task blocks

It would make me feel better, but it would defeat the purpose.
There's a lot of code holding semaphores.

> AND it is legal to block while holding a preemption lock.

But it's easier to fix. If you can preempt only by explicitely
sleeping, you can beat priority invasion by changing basically
only wake_up. If you can be preempted at random, you need to know
who holds a semaphore.

	Regards
		Oliver

^ permalink raw reply

* Re: Aunt Tillie builds a kernel (was Re: ISA hardware discovery -- the elegant solution)
From: Sean Hunter @ 2002-01-15  9:14 UTC (permalink / raw)
  To: Eric S. Raymond, Rob Landley, Charles Cazabon, Linux Kernel List,
	Alan Cox, Eli Carter, Michael Lazarou (ETL)
In-Reply-To: <20020114173423.A23081@thyrsus.com>

On Mon, Jan 14, 2002 at 05:34:23PM -0500, Eric S. Raymond wrote:
> Because the second we stop thinking about Aunt Tillie,
> we start making excuses for badly-designed interfaces and excessive
> complexity. 

Bollocks.  The second we (including you) stop thinking about the _user_ of the
technology, we make bad decisions.  This is not the same thing.  

We don't expect Aunt Tillie to write kernel drivers for her knitting machine.
She (and we) expect(s) someone else to do that for her.

The Aunt Tillies of this world don't install of update Windows (or Mac O/S) for
themselves except perhaps via "Windows Update" or "Apple Update", which (guess
what) supplies a prebuilt binary and DOESN'T BUILD THEM A KERNEL.

Besides any other factor, the download/install/reboot time is less than the
download-full-tarball/untar/configure/compile/install/reboot cycle.

Sean

^ permalink raw reply

* [PATCH] fix two bugs in lib/vsprintf.c
From: Roland Dreier @ 2002-01-15  9:25 UTC (permalink / raw)
  To: torvalds, marcelo, alan, linux-kernel

The below patch fixes two bugs in lib/vsprintf.c's implementation of
vsscanf().  First, the man page for vsscanf() says about the 'i'
conversion:

       i      Matches an  optionally  signed  integer;  the  next
              pointer  must  be a pointer to int.  The integer is
              read in base 16 if it begins with `0x' or `0X',  in
              base  8  if  it  begins  with  `0',  and in base 10
              otherwise.  Only characters that correspond to  the
              base are used.

To me this means that vsscanf() should pass base 0 to simple_strtol;
however the Linux implementation defaults to base 10.  The first part
of the patch corrects this.

Second, vsscanf() checks the first character of the number it's about
to read using isdigit(); this is incorrect for hex or octal
conversions.  The second part of this patch corrects vsscanf() to use
the correct check depending on the value of base.

lib/vsprintf.c has not changed in quite a while, so this patch should
apply cleanly to 2.4.17, 2.4.18pre3 and 2.5.2.

Thanks,
  Roland

diff -Naur linux-2.4.17.orig/lib/vsprintf.c linux-2.4.17/lib/vsprintf.c
--- linux-2.4.17.orig/lib/vsprintf.c	Thu Oct 11 11:17:22 2001
+++ linux-2.4.17/lib/vsprintf.c	Tue Jan 15 01:06:29 2002
@@ -616,8 +616,9 @@
 		case 'X':
 			base = 16;
 			break;
-		case 'd':
 		case 'i':
+                        base = 0;
+		case 'd':
 			is_sign = 1;
 		case 'u':
 			break;
@@ -637,7 +638,11 @@
 		while (isspace(*str))
 			str++;
 
-		if (!*str || !isdigit(*str))
+		if (!*str
+                    || (base == 16 && !isxdigit(*str))
+                    || (base == 10 && !isdigit(*str))
+                    || (base == 8 && (!isdigit(*str) || *str > '7'))
+                    || (base == 0 && !isdigit(*str)))
 			break;
 
 		switch(qualifier) {

-- 
Roland Dreier                                <roland@digitalvampire.org>
GPG Key fingerprint = A89F B5E9 C185 F34D BD50  4009 37E2 25CC E0EE FAC0

^ permalink raw reply

* [linux-lvm] LVM patches on LKML - are they needed?
From: Adrian Head @ 2002-01-15  9:28 UTC (permalink / raw)
  To: linux-lvm

Recently - there was a tread on the LKML 
"[lvm-devel] [PATCH][2.5.2-pre11] lvm critical fixes | where is the lvm 
maintainer?"
http://marc.theaimsgroup.com/?l=linux-kernel&m=101080017328995&w=2

Does anyone know whether the patches in this thread apply to the 2.4.x branch 
or the 2.5.x branch? LVM1 or LVM2?

If they are needed for the 2.4.x branch - will they be in CVS soon?

-- 
Adrian Head

(Public Key available on request.)

^ permalink raw reply


This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.