All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: XFree86 crash log
From: Ray Olszewski @ 2002-11-13  3:02 UTC (permalink / raw)
  To: linux-newbie
In-Reply-To: <3DD5D41B@mailandnews.com>

I have not seen this particular error before. And lik many of us here, I am 
not a user of BasicLinux, so the help I can offer is limited.

1. Is this the complete error output (that is, does it match what is in 
"/var/log/XFree86.0.log")? If not, please send complete output, as the 
message tells you to.

2. The sockets the message refers to are probably the local Unix sockets 
that the server uses to accept connections from clients. What does "netstat 
-an" report? Are there listings that resemble this one:

         unix  2      [ ACC 
]     STREAM     LISTENING     427    /tmp/.X11-unix/X0

3. Does the /tmp directory exist (this is a long shot, as it is very 
standard as a part of Linux systems)? Is it mode 777?

4. Does your kernel support Unix domain sockets? If you compiled your own, 
it is an option under "Networking" in the "make menuconfig" method of 
configuring, for 2.4.x kernels. If you are using any stock Slackware 
kernel, it probably supports Unix sockets. If you are using one from 
BasicLinux ... well, the BasicLinux home page says it supports X installs, 
so I suppose the kernel includes what is needed (but I have no way actually 
to know).

5. BasicLinux has a page that lists the Slackware packages needed to run X. 
Its URL is

         http://www.ibiblio.org/pub/linux/distributions/baslinux/bas-x.html

Did you include everything this page says to install?

That's about all I can think of without more info. Hope it helps.

At 09:23 PM 11/12/02 -0500, james miller wrote:
>Hello all:
>
>I posted to the list some time ago about problems I was having getting X
>running. That was on another computer, and I never managed to resolve the
>problems. Now, I'm confronting the problem again and it's high time I figured
>out what I'm doing wrong and fix it. And, I stand to learn alot about X and
>the way the gui works under Linux in the process - knowing, at the moment,
>virtually nothing.
>
>Right now, I am trying to install a minimal Slackware (8.1) version via a
>routine developed by the creator of Basiclinux. The minimal install does not
>have X installed or configured, but it does give one access to the Slackware
>pkgtool and, via this, to the possibility for installing whatever packages 
>one
>wishes from the Slackware CD. I used this routine to install XFree86 4.2. So
>far as I could tell, I installed all necessary packages: I may well have
>missed something important and am simply not sure if my problem may not come
>down to something like this.
>
>In any case, after installing XFree86 and associated packages (e.g., 
>fonts), I
>ran xf86config from the command line. I selected refresh rates that my 
>monitor
>seems likely to support (it is a 14" Epson extended vga) and my video card 
>(S3
>Trio 64v+). When I try to run "startx," the X server crashes with the
>following report dumped to /var/log/:
>
>##############################################################
>_XSERVTransSocketOpen: socket() failed for tcp
>_XSERVTransSocketOpenCOTSServer: Unable to open socket for tcp
>_XSERVTransOpen: transport open failed for tcp/darkstar:0
>_XSERVTransMakeAllCOTSServerListeners: failed to open listener for tcp
>_XSERVTransSocketOpen: socket() failed for local
>_XSERVTransSocketOpenCOTSServer: Unable to open socket for local
>_XSERVTransOpen: transport open failed for local/darkstar:0
>_XSERVTransMakeAllCOTSServerListeners: failed to open listener for local
>
>Fatal server error:
>Cannot establish any listening sockets - Make sure an X server isn't already
>running
>
>When reporting a problem related to a server crash, please send
>the full server output, not just the last messages.
>This can be found in the log file "/var/log/XFree86.0.log".
>###########################################################
>
>Can someone help point me in the right direction for resolving this problem
>and getting a working X install?
>
>Thanks, James
>
>PS This is an old test computer - 486 DX4 100 with 40MB RAM and 1.3 GB HD.




--
-------------------------------------------"Never tell me the odds!"--------
Ray Olszewski					-- Han Solo
Palo Alto, California, USA			  ray@comarre.com
-------------------------------------------------------------------------------

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

^ permalink raw reply

* Re: md on shared storage
From: Michael Clark @ 2002-11-13  3:00 UTC (permalink / raw)
  To: Steven Dake; +Cc: Brian Jackson, linux-kernel@vger.kernel.org
In-Reply-To: <3DD1A899.8080800@mvista.com>

On 11/13/02 09:19, Steven Dake wrote:
> Brian,
> 
> The RAID driver does indeed work with shared storage, if you don't have 
> RAID autostart set as the partition type.  If you do, each host will try 
> to rebuild the RAID array resulting in really bad magic.
> 
> I posted patches to solve this problem long ago to this list and 
> linux-raid, but Neil Brown (md maintainer) rejected them saying that 
> access to a raid volume should be controlled by user space, not by the 
> kernel.  Everyone is entitled to their opinions I guess. :)
> 
> The patch worked by locking RAID volumes to either a FibreChannel host 
> WWN (qlogic only) or scsi host id.  This ensured that if a raid volume 
> was started, it could ONLY be started on the host that created it.  This 
> worked for the autostart path as well as the start path via IOCTL.
> 
> I also modified mdadm to handle takeover for failed nodes to takeover 
> RAID arrays.
> 
> I'm extending this type of support into LVM volume groups as we speak. 
> If you would like to see the patch when I'm done mail me and I'll send 
> it out.  This only applies to 2.4.19.

I'm interested in finding what magic is required to get a stable
setup with qlogic drivers and LVM. I have tested many kernel combinations,
vendor kernels, stock, -aa and variety of different qlogic drivers
inclusing the one with the alleged stack hog fixes and they all ooops
when using LVM (can take up to 10 days of production load). Removing
LVM 45 days ago and now I have 45 days uptime on these boxes.

I'm currently building a test setup to try and excercise this problem
as all my other boxes with qlogic cards are production and can't be
played with. I really miss having volume management and a SAN setup
is really where you need it the most.

~mc


^ permalink raw reply

* Re: NAT only - No connection tracking
From: Jet @ 2002-11-13  2:46 UTC (permalink / raw)
  To: netfilter@lists, Filip Sneppe
In-Reply-To: <1037099676.12587.8.camel@hope>

Thanks for all the reply.

I'm now looking at http://www.policyrouting.org/ and might plan to buy a
copy of it.

Thanks again everyone here for such a good help.

.//Jet

----- Original Message -----
From: "Filip Sneppe" <filip.sneppe@cronos.be>
To: "Brad Chapman" <kakadu_croc@yahoo.com>
Cc: "Antony Stone" <Antony@Soft-Solutions.co.uk>;
<netfilter@lists.netfilter.org>
Sent: Tuesday, November 12, 2002 7:14 PM
Subject: Re: NAT only - No connection tracking



>>
> The book is being released online at http://www.policyrouting.org/,
> but is definately worth the buy.
>
> Regards,
> Filip
>
>



^ permalink raw reply

* Re: md on shared storage
From: Michael Clark @ 2002-11-13  2:51 UTC (permalink / raw)
  To: Brian Jackson; +Cc: linux-kernel@vger.kernel.org
In-Reply-To: <20021113002529.7413.qmail@escalade.vistahp.com>

On 11/13/02 08:25, Brian Jackson wrote:
> Here's a question for all those out there that are smarter than me(so I 
> guess that's most of you then :) I looked around (google, kernel source, 
> etc.) trying to find the answer, but came up with nothing.
> Does the MD driver work with shared storage? I would also be interested 
> to know if the new DM driver works with shared storage(though I must 
> admit I didn't really try to answer this one myself, just hoping 
> somebody will know).

They should work, obviously with some caveats. Having 2 hosts both
trying to reconstruct the same md RAID1 may cause some troubles.

> I ask because I seem to be having some strange problems with an md 
> device on shared storage(Qlogic FC controllers). The qlogic drivers spit 
> out messages for about 20-60 lines then the machines lock up. So the 
> drivers were my first suspicion, but they were working okay before. So I 
> went back and got rid of the md device and now everything is working 
> again. Anybody got any ideas?

Could be a stack related problem with the qlogic driver. The additional
stack pressure of the md layer perhaps ?? The 20-60 lines of logs in
would probably give some ideas.

I have a couple of shared storage clusters that were using qla2300
driver, ext3 and LVM1 and they would periodically ooops. Removed LVM
and the systems are now rock solid.

~mc


^ permalink raw reply

* offer to Sell Men sandal shoes USD 1.65/PR
From: mike @ 2002-11-13  1:01 UTC (permalink / raw)
  To: nfs

[-- Attachment #1: Type: text/plain, Size: 1114 bytes --]

offer to Sell Men sandal shoes USD 1.65/PR 

Size: 40-45#¡¡ 
Upper: PVC¡¡ 
CTN Meas: 56.5X52.5X35.5 CM 
Outsole: PVC OUTSOLE¡¡ 
Packing: PLYBAG¡¡ 
Color: THREE COLOR¡¡ 
Delivery Date: 9 Days 
Total Quantity: 20000 Pairs¡¡ Mini Order: 3000 Pairs¡¡ 
U.Price: USD 1.65 /PR Payment Terms: T/T OR D/P¡¡ 
Assort: 2 3 4 4 3 2¡¡ Workmanship: CEMENTED¡¡ 
Detail: 36 PRS/CTN 

We are a leading exporter of china,we can supply you many kinds 
of products that made in china.
 First of all, we are highly recommending you to look through our 
website and then let us know item. No. you are interested. There 
are Price, QTY, material, size,picture... online .You can contact
us easy through MSN,E-MAIL,YAHOO MESSENGER,ICQ etc...

****************************************************
R-START(JINJIANG) SHOES TRADING CO.,LTD.
GAFU INDUSTRIAL CO.,LTD.
Airport Road, Qingyang Town, Jinjiang City, Fujian Province
*****MNS MESSENGER contact£ºr-start@163.com  searchshoes@searchshoes.com  ****
EL£º86-595-5278500 / 5278809/5626511/5626512
FAX£º86-595-5626513
http://www.searchshoes.com 
E£­mail:  SEARCHSHOES@163.COM      
        

[-- Attachment #2: 021029115229b.jpg --]
[-- Type: application/octet-stream, Size: 28196 bytes --]

^ permalink raw reply

* [PATCH][2.5] xircom_cb small cleanups
From: Zwane Mwaikambo @ 2002-11-13  2:37 UTC (permalink / raw)
  To: Linux Kernel; +Cc: Jeff Garzik

Index: linux-2.5.47/drivers/net/tulip/xircom_cb.c
===================================================================
RCS file: /build/cvsroot/linux-2.5.47/drivers/net/tulip/xircom_cb.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 xircom_cb.c
--- linux-2.5.47/drivers/net/tulip/xircom_cb.c	11 Nov 2002 03:57:05 -0000	1.1.1.1
+++ linux-2.5.47/drivers/net/tulip/xircom_cb.c	13 Nov 2002 01:52:53 -0000
@@ -154,8 +154,6 @@
 	.id_table	= xircom_pci_table, 
 	.probe		= xircom_probe, 
 	.remove		= xircom_remove, 
-	.suspend =NULL,
-	.resume =NULL
 };
 
 
@@ -201,9 +199,9 @@
 static int private_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
 {
 
-       switch(cmd) {
-       case SIOCETHTOOL:
-	       return netdev_ethtool_ioctl(dev, (void *) rq->ifr_data);
+	switch(cmd) {
+	case SIOCETHTOOL:
+		return netdev_ethtool_ioctl(dev, (void *) rq->ifr_data);
 	default:
 		return -EOPNOTSUPP;
 	}
@@ -221,15 +219,17 @@
 	struct net_device *dev = NULL;
 	struct xircom_private *private;
 	unsigned char chip_rev;
-	unsigned long flags;
+	unsigned long flags, io_start;
 	unsigned short tmp16;
+	int rc = -ENODEV;
 	enter("xircom_probe");
 	
 	/* First do the PCI initialisation */
 
 	if (pci_enable_device(pdev))
-		return -ENODEV;
+		goto exit;
 
+	rc = -ENOMEM;
 	/* disable all powermanagement */
 	pci_write_config_dword(pdev, PCI_POWERMGMT, 0x0000);
 	
@@ -240,51 +240,48 @@
 	pci_write_config_word (pdev, PCI_STATUS,tmp16);
 	
 	pci_read_config_byte(pdev, PCI_REVISION_ID, &chip_rev);
-	
-	if (!request_region(pci_resource_start(pdev, 0), 128, "xircom_cb")) {
-		printk(KERN_ERR "xircom_probe: failed to allocate io-region\n");
-		return -ENODEV;
+	io_start = pci_resource_start(pdev, 0);
+	if (!request_region(io_start, 128, "xircom_cb")) {
+		printk(KERN_ERR "xircom_probe: failed to allocate io-region \n");
+		goto exit;
 	}
 
-	
 	/* 
 	   Before changing the hardware, allocate the memory.
 	   This way, we can fail gracefully if not enough memory
 	   is available. 
 	 */
 	private = kmalloc(sizeof(*private),GFP_KERNEL);
-	memset(private, 0, sizeof(struct xircom_private));
+	if (private == NULL)
+		goto out_free_region;
+
+	memset(private, 0, sizeof *private);
 	
 	/* Allocate the send/receive buffers */
 	private->rx_buffer = pci_alloc_consistent(pdev,8192,&private->rx_dma_handle);
 	
 	if (private->rx_buffer == NULL) {
  		printk(KERN_ERR "xircom_probe: no memory for rx buffer \n");
- 		kfree(private);
-		return -ENODEV;
+		goto out_free_mem;
 	}	
 	private->tx_buffer = pci_alloc_consistent(pdev,8192,&private->tx_dma_handle);
 	if (private->tx_buffer == NULL) {
 		printk(KERN_ERR "xircom_probe: no memory for tx buffer \n");
-		kfree(private->rx_buffer);
-		kfree(private);
-		return -ENODEV;
+		goto out_free_mem;
 	}
 	dev = init_etherdev(dev, 0);
 	if (dev == NULL) {
 		printk(KERN_ERR "xircom_probe: failed to allocate etherdev\n");
-		kfree(private->rx_buffer);
-		kfree(private->tx_buffer);
-		kfree(private);
-		return -ENODEV;
+		goto out_free_mem;
 	}
 	SET_MODULE_OWNER(dev);
 	printk(KERN_INFO "%s: Xircom cardbus revision %i at irq %i \n", dev->name, chip_rev, pdev->irq);
 
+	rc = 0;
 	private->dev = dev;
 	private->pdev = pdev;
-	private->io_port = pci_resource_start(pdev, 0);
-	private->lock = SPIN_LOCK_UNLOCKED;
+	private->io_port = io_start;
+	spin_lock_init(&private->lock);
 	dev->irq = pdev->irq;
 	dev->base_addr = private->io_port;
 	
@@ -307,14 +304,23 @@
 	tranceiver_voodoo(private);
 	
 	spin_lock_irqsave(&private->lock,flags);
-	  activate_transmitter(private);
-	  activate_receiver(private);
+	activate_transmitter(private);
+	activate_receiver(private);
 	spin_unlock_irqrestore(&private->lock,flags);
 	
 	trigger_receive(private);
-	
+	goto exit;
+
+out_free_mem:
+	kfree(private->rx_buffer);
+	kfree(private->tx_buffer);
+	kfree(private);
+out_free_region:
+	release_region(io_start, 128);
+	pci_disable_device(pdev);
+exit:
 	leave("xircom_probe");
-	return 0;
+	return rc;
 }
 
 
-- 
function.linuxpower.ca


^ permalink raw reply

* Re: [linux-lvm] can't make new filesystems?
From: Luca Berra @ 2002-11-13  2:33 UTC (permalink / raw)
  To: Linux LVM Sistina
In-Reply-To: <Pine.A41.4.43.0211121809350.48658-100000@hera.itg.uiuc.edu>

On Tue, Nov 12, 2002 at 06:19:20PM -0600, Alexander Lazarevich wrote:
[vc/2]bluca@Moskowskaya:~% mkfs.ext3
mke2fs 1.27 (8-Mar-2002)
Usage: mkfs.ext3 [-c|-t|-l filename] [-b block-size] [-f fragment-size]
        [-i bytes-per-inode] [-j] [-J journal-options] [-N number-of-inodes]
        [-m reserved-blocks-percentage] [-o creator-os] [-g blocks-per-group]
        [-L volume-label] [-M last-mounted-directory] [-O feature[,...]]
        [-r fs-revision] [-R raid_opts] [-qvSV] device [blocks-count]

this says the last (only) two non option arguments are the device and the
number of blocks the device has.

>[root@discord root]# mkfs.ext3 /dev/homevg/stafflv /home/staff
>mke2fs 1.27 (8-Mar-2002)
>mkfs.ext3: bad blocks count - /home/staff

this error says that the string '/home/staff' does not look like a number
of blocks at all.

L.

-- 
Luca Berra -- bluca@comedia.it
        Communication Media & Services S.r.l.
 /"\
 \ /     ASCII RIBBON CAMPAIGN
  X        AGAINST HTML MAIL
 / \

^ permalink raw reply

* cannot open shared object file: no such file or directory
From: James Stickland @ 2002-11-13  2:27 UTC (permalink / raw)
  To: netfilter

Hi, i recently ran patch-o-matic to patch my kernel for the string match
from the extra patches.

I ran patch-o-matic, and it copied the string files to
/usr/src/linux/net/ipv4/netfilter.  Ok, so far so good.

I went to compile my kernel, and have ipt_string as a module.  I did so by
adding the line CONFIG_IP_NF_MATCH_STRING=m in my /usr/src/linux/.config.

I proceeded to do the standard make dep ; make modules ; make
modules_install ; make bzImage.  THe kernel compiled, i rebooted, and was
successfully able to modprobe ipt_string.
(/lib/modules/2.4.19/kernel/net/ipv4/netfilter/ipt_string.o)

However, when i went to make use of the ipt_string match in an iptables
rule, i was given the following error:

iptables v1.2.7a: Couldn't load match
`string':/usr/local/lib/iptables/libipt_st
ring.so: cannot open shared object file: No such file or directory

Upon inspection, the libipt_string.so did not exist in
/usr/local/lib/iptables.  How do i get this netfilter library to exist?

I had this problem the last time i patched my kernel to support ipt_psd,
but i cannot recall how i was able to get the psd library to exist.

Did i miss a step while patching this time?  Anyone with help please
respond to the list and my email directly - jamesstickland@sympatico.ca

Thank you.






^ permalink raw reply

* XFree86 crash log
From: james miller @ 2002-11-13  2:23 UTC (permalink / raw)
  To: linux-newbie

Hello all:

I posted to the list some time ago about problems I was having getting X 
running. That was on another computer, and I never managed to resolve the 
problems. Now, I'm confronting the problem again and it's high time I figured 
out what I'm doing wrong and fix it. And, I stand to learn alot about X and 
the way the gui works under Linux in the process - knowing, at the moment, 
virtually nothing.

Right now, I am trying to install a minimal Slackware (8.1) version via a 
routine developed by the creator of Basiclinux. The minimal install does not 
have X installed or configured, but it does give one access to the Slackware 
pkgtool and, via this, to the possibility for installing whatever packages one 
wishes from the Slackware CD. I used this routine to install XFree86 4.2. So 
far as I could tell, I installed all necessary packages: I may well have 
missed something important and am simply not sure if my problem may not come 
down to something like this.

In any case, after installing XFree86 and associated packages (e.g., fonts), I 
ran xf86config from the command line. I selected refresh rates that my monitor 
seems likely to support (it is a 14" Epson extended vga) and my video card (S3 
Trio 64v+). When I try to run "startx," the X server crashes with the 
following report dumped to /var/log/:

##############################################################
_XSERVTransSocketOpen: socket() failed for tcp
_XSERVTransSocketOpenCOTSServer: Unable to open socket for tcp
_XSERVTransOpen: transport open failed for tcp/darkstar:0
_XSERVTransMakeAllCOTSServerListeners: failed to open listener for tcp
_XSERVTransSocketOpen: socket() failed for local
_XSERVTransSocketOpenCOTSServer: Unable to open socket for local
_XSERVTransOpen: transport open failed for local/darkstar:0
_XSERVTransMakeAllCOTSServerListeners: failed to open listener for local

Fatal server error:
Cannot establish any listening sockets - Make sure an X server isn't already 
running

When reporting a problem related to a server crash, please send
the full server output, not just the last messages.
This can be found in the log file "/var/log/XFree86.0.log".
###########################################################

Can someone help point me in the right direction for resolving this problem 
and getting a working X install?

Thanks, James

PS This is an old test computer - 486 DX4 100 with 40MB RAM and 1.3 GB HD.

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

^ permalink raw reply

* Re: RAID-6
From: Jakob Oestergaard @ 2002-11-13  2:13 UTC (permalink / raw)
  To: Neil Brown; +Cc: H. Peter Anvin, linux-raid
In-Reply-To: <15825.22660.685310.237185@notabene.cse.unsw.edu.au>

On Wed, Nov 13, 2002 at 06:37:40AM +1100, Neil Brown wrote:
> On Tuesday November 12, jakob@unthought.net wrote:
> > 
> > You might want to consider using huge chunk-sizes when reading, but
> > making sure that writes can be made on "sub-chunks" - so that one could
> > run a RAID-6 with a 128k chunk size, yet have writes performed on 4k
> > chunks.  This is important for performance on both read and write, but
> > it is an optimization the current RAID-5 code lacks.
> 
> Either I misunderstand your point, or you misunderstand the code.
> 
> A 4k write request will cause a 4k write to a data block and a 4k
> write to a parity block, no matter what the chunk size is. (There may
> also be pre-reading, and possibly several 4k writes will share a
> parity block update).

Writes on a 128k chunk array are significantly slower than writes on a
4k chunk array, according to someone else on this list   -  I wanted to
look into this myself, but now is just a bad time for me (nothing new
on that front).

The benchmark goes:

| some tests on raid5 with 4k and 128k chunk size. The results are as follows:
| Access Spec     4K(MBps)        4K-deg(MBps)    128K(MBps) 128K-deg(MBps)
| 2K Seq Read     23.015089       33.293993       25.415035  32.669278
| 2K Seq Write    27.363041       30.555328       14.185889  16.087862
| 64K Seq Read    22.952559       44.414774       26.02711   44.036993
| 64K Seq Write   25.171833       32.67759        13.97861   15.618126

So down from 27MB/sec to 14MB/sec running 2k-block sequential writes on
a 128k chunk array versus a 4k chunk array (non-degraded).

In degraded mode, the writes degenerate from 30MB/sec to 16MB/sec as the
chunk-size increases.

Something's fishy.

> 
> I see no lacking optimisation, but if you do, I would be keen to hear
> a more detailed explanation.

Well if a 4k write really only causes a 4k write to disk, even with a
128k chunk-size array, then something else is happening...

I didn't do the benchmark, and I didn't get to investigate it further
here, so I can't really say much else productive  :)


 / Jakob "linux-raid message multiplexer" Østergaard

-- 
................................................................
:   jakob@unthought.net   : And I see the elder races,         :
:.........................: putrid forms of man                :
:   Jakob Østergaard      : See him rise and claim the earth,  :
:        OZ9ABN           : his downfall is at hand.           :
:.........................:............{Konkhra}...............:
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply

* repeatable IDE errors when using SMART
From: dean gaudet @ 2002-11-13  2:19 UTC (permalink / raw)
  To: linux-kernel

i'm 99.99% certain that the use of smartctl and/or hddtemp is causing my
system to lose contact with the drives.  there's just been far too many
concidental errors of this sort:

hdi: status timeout: status=0xd0 { Busy }
hdi: drive not ready for command
hdi: status error: status=0x58 { DriveReady SeekComplete DataRequest }
hdi: drive not ready for command

at the exact time i've got cron jobs running to do either "smartctl -a" or
"hddtemp", or at a time when i run the command by hand.

at some times the error state is bad enough to cause md to mark the disk
as bad.

at one point i started running hddtemp every 5 minutes for logging
purposes and it took less than 2 days for the system to lose contact with
one of the disks... and this repeated after i rebooted.

system is:

- linux 2.4.19-pre7-ac4
- tyan 2462, dual athlon 1.4GHz (onboard IDE is unused)
- promise ultra 100TX2
- promise ultra 133TX2
- 4x maxtor D740X 80GB (each master on one of the promise channels)
  (3x 6L080J4, and 1x 6L080L4)

i've replaced drives (always D740X though), cables, and controllers
(swapping a 100TX2 for the 133TX2 which is in there now).

the problem has appeared on all the IDE ports, so it's not restricted to
any one port/drive.  however hdi seems to be particularly sensitive --
even after several controller, disk, and cable combinations.  the 4 disks
are in a sw raid5 which is well balanced according to iostat -- except
that hdi is the hottest disk in the box (41C vs 35C 28C 32C).

any suggestions?

obviously i could move to a more recent kernel ... but i stayed back on
pre7-ac4 because it seemed later kernels messed up the promise driver in
some way and i never quite paid attention enough to know what a good
stable 2.4.x ac kernel was post pre7-ac4.  suggestions welcome.

any known errata regarding SMART accesses interfering with other
operations?

-dean


^ permalink raw reply

* [PATCH] ipv4: convert /proc/net/snmp to seq_file
From: Arnaldo Carvalho de Melo @ 2002-11-13  2:19 UTC (permalink / raw)
  To: David S. Miller; +Cc: Linux Kernel Mailing List

Hi David,

	Please pull from:

master.kernel.org:/home/acme/BK/net-2.5

- Arnaldo

You can import this changeset into BK by piping this whole message to:
'| bk receive [path to repository]' or apply the patch as usual.

===================================================================


ChangeSet@1.825, 2002-11-12 22:55:20-02:00, acme@conectiva.com.br
  o ipv4: convert /proc/net/snmp to seq_file


 proc.c |  121 +++++++++++++++++++++++++++++++++++++++--------------------------
 1 files changed, 74 insertions(+), 47 deletions(-)


diff -Nru a/net/ipv4/proc.c b/net/ipv4/proc.c
--- a/net/ipv4/proc.c	Wed Nov 13 00:18:37 2002
+++ b/net/ipv4/proc.c	Wed Nov 13 00:18:37 2002
@@ -26,6 +26,7 @@
  *	Andi Kleen		:	Add support for open_requests and 
  *					split functions for more readibility.
  *	Andi Kleen		:	Add support for /proc/net/netstat
+ *	Arnaldo C. Melo		:	Convert to seq_file
  *
  *		This program is free software; you can redistribute it and/or
  *		modify it under the terms of the GNU General Public License
@@ -115,52 +116,73 @@
 /* 
  *	Called from the PROCfs module. This outputs /proc/net/snmp.
  */
- 
-int snmp_get_info(char *buffer, char **start, off_t offset, int length)
+static int snmp_seq_show(struct seq_file *seq, void *v)
 {
 	extern int sysctl_ip_default_ttl;
-	int len, i;
+	int i;
 
-	len = sprintf (buffer,
-		"Ip: Forwarding DefaultTTL InReceives InHdrErrors InAddrErrors ForwDatagrams InUnknownProtos InDiscards InDelivers OutRequests OutDiscards OutNoRoutes ReasmTimeout ReasmReqds ReasmOKs ReasmFails FragOKs FragFails FragCreates\n"
-		"Ip: %d %d", ipv4_devconf.forwarding ? 1 : 2, sysctl_ip_default_ttl);
-	for (i=0; i<offsetof(struct ip_mib, __pad)/sizeof(unsigned long); i++)
-		len += sprintf(buffer+len, " %lu", fold_field((unsigned long*)ip_statistics, sizeof(struct ip_mib), i));
-
-	len += sprintf (buffer + len,
-		"\nIcmp: InMsgs InErrors InDestUnreachs InTimeExcds InParmProbs InSrcQuenchs InRedirects InEchos InEchoReps InTimestamps InTimestampReps InAddrMasks InAddrMaskReps OutMsgs OutErrors OutDestUnreachs OutTimeExcds OutParmProbs OutSrcQuenchs OutRedirects OutEchos OutEchoReps OutTimestamps OutTimestampReps OutAddrMasks OutAddrMaskReps\n"
-		  "Icmp:");
-	for (i=0; i<offsetof(struct icmp_mib, dummy)/sizeof(unsigned long); i++)
-		len += sprintf(buffer+len, " %lu", fold_field((unsigned long*)icmp_statistics, sizeof(struct icmp_mib), i));
-
-	len += sprintf (buffer + len,
-		"\nTcp: RtoAlgorithm RtoMin RtoMax MaxConn ActiveOpens PassiveOpens AttemptFails EstabResets CurrEstab InSegs OutSegs RetransSegs InErrs OutRsts\n"
-		  "Tcp:");
-	for (i=0; i<offsetof(struct tcp_mib, __pad)/sizeof(unsigned long); i++)
-		len += sprintf(buffer+len, " %lu", fold_field((unsigned long*)tcp_statistics, sizeof(struct tcp_mib), i));
-
-	len += sprintf (buffer + len,
-		"\nUdp: InDatagrams NoPorts InErrors OutDatagrams\n"
-		  "Udp:");
-	for (i=0; i<offsetof(struct udp_mib, __pad)/sizeof(unsigned long); i++)
-		len += sprintf(buffer+len, " %lu", fold_field((unsigned long*)udp_statistics, sizeof(struct udp_mib), i));
+	seq_printf(seq, "Ip: Forwarding DefaultTTL InReceives InHdrErrors "
+			"InAddrErrors ForwDatagrams InUnknownProtos "
+			"InDiscards InDelivers OutRequests OutDiscards "
+			"OutNoRoutes ReasmTimeout ReasmReqds ReasmOKs "
+			"ReasmFails FragOKs FragFails FragCreates\nIp: %d %d",
+			ipv4_devconf.forwarding ? 1 : 2, sysctl_ip_default_ttl);
 
-	len += sprintf (buffer + len, "\n");
+	for (i = 0;
+	     i < offsetof(struct ip_mib, __pad) / sizeof(unsigned long); i++)
+		seq_printf(seq, " %lu",
+			   fold_field((unsigned long *)ip_statistics,
+				      sizeof(struct ip_mib), i));
 
-	if (offset >= len)
-	{
-		*start = buffer;
-		return 0;
-	}
-	*start = buffer + offset;
-	len -= offset;
-	if (len > length)
-		len = length;
-	if (len < 0)
-		len = 0; 
-	return len;
+	seq_printf(seq, "\nIcmp: InMsgs InErrors InDestUnreachs InTimeExcds "
+			"InParmProbs InSrcQuenchs InRedirects InEchos "
+			"InEchoReps InTimestamps InTimestampReps InAddrMasks "
+			"InAddrMaskReps OutMsgs OutErrors OutDestUnreachs "
+			"OutTimeExcds OutParmProbs OutSrcQuenchs OutRedirects "
+			"OutEchos OutEchoReps OutTimestamps OutTimestampReps "
+			"OutAddrMasks OutAddrMaskReps\nIcmp:");
+
+	for (i = 0;
+	     i < offsetof(struct icmp_mib, dummy) / sizeof(unsigned long); i++)
+		seq_printf(seq, " %lu",
+			   fold_field((unsigned long *)icmp_statistics,
+				      sizeof(struct icmp_mib), i));
+
+	seq_printf(seq, "\nTcp: RtoAlgorithm RtoMin RtoMax MaxConn ActiveOpens "
+			"PassiveOpens AttemptFails EstabResets CurrEstab "
+			"InSegs OutSegs RetransSegs InErrs OutRsts\nTcp:");
+
+	for (i = 0;
+	     i < offsetof(struct tcp_mib, __pad) / sizeof(unsigned long); i++)
+		seq_printf(seq, " %lu",
+			   fold_field((unsigned long *)tcp_statistics,
+				      sizeof(struct tcp_mib), i));
+
+	seq_printf(seq, "\nUdp: InDatagrams NoPorts InErrors OutDatagrams\n"
+			"Udp:");
+	
+	for (i = 0;
+	     i < offsetof(struct udp_mib, __pad) / sizeof(unsigned long); i++)
+		seq_printf(seq, " %lu",
+			   fold_field((unsigned long *)udp_statistics,
+				      sizeof(struct udp_mib), i));
+
+	seq_putc(seq, '\n');
+	return 0;
 }
 
+static int snmp_seq_open(struct inode *inode, struct file *file)
+{
+	return single_open(file, snmp_seq_show, NULL);
+}
+
+static struct file_operations snmp_seq_fops = {
+	.open	 = snmp_seq_open,
+	.read	 = seq_read,
+	.llseek	 = seq_lseek,
+	.release = single_release,
+};
+
 /* 
  *	Output /proc/net/netstat
  */
@@ -181,7 +203,8 @@
 		      " TCPPureAcks TCPHPAcks"
 		      " TCPRenoRecovery TCPSackRecovery"
 		      " TCPSACKReneging"
-		      " TCPFACKReorder TCPSACKReorder TCPRenoReorder TCPTSReorder"
+		      " TCPFACKReorder TCPSACKReorder TCPRenoReorder"
+		      " TCPTSReorder"
 		      " TCPFullUndo TCPPartialUndo TCPDSACKUndo TCPLossUndo"
 		      " TCPLoss TCPLostRetransmit"
 		      " TCPRenoFailures TCPSackFailures TCPLossFailures"
@@ -189,14 +212,14 @@
 		      " TCPTimeouts"
 		      " TCPRenoRecoveryFail TCPSackRecoveryFail"
 		      " TCPSchedulerFailed TCPRcvCollapsed"
-		      " TCPDSACKOldSent TCPDSACKOfoSent TCPDSACKRecv TCPDSACKOfoRecv"
+		      " TCPDSACKOldSent TCPDSACKOfoSent TCPDSACKRecv"
+		      " TCPDSACKOfoRecv"
 		      " TCPAbortOnSyn TCPAbortOnData TCPAbortOnClose"
 		      " TCPAbortOnMemory TCPAbortOnTimeout TCPAbortOnLinger"
 		      " TCPAbortFailed TCPMemoryPressures\n"
 		      "TcpExt:");
 	for (i = 0;
-	     i < offsetof(struct linux_mib, __pad) / sizeof(unsigned long);
-	     i++)
+	     i < offsetof(struct linux_mib, __pad) / sizeof(unsigned long); i++)
 		seq_printf(seq, " %lu",
 			   fold_field((unsigned long *)net_statistics,
 				      sizeof(struct linux_mib), i));
@@ -219,20 +242,24 @@
 int __init ip_misc_proc_init(void)
 {
 	int rc = 0;
-	struct proc_dir_entry *p = create_proc_entry("netstat", S_IRUGO, proc_net);
-
+	struct proc_dir_entry *p;
+		
+	p = create_proc_entry("netstat", S_IRUGO, proc_net);
 	if (!p)
 		goto out_netstat;
 	p->proc_fops = &netstat_seq_fops;
 
-	if (!proc_net_create("snmp", 0, snmp_get_info))
+	p = create_proc_entry("snmp", S_IRUGO, proc_net);
+	if (!p)
 		goto out_snmp;
+	p->proc_fops = &snmp_seq_fops;
+
 	if (!proc_net_create("sockstat", 0, afinet_get_info))
 		goto out_sockstat;
 out:
 	return rc;
 out_sockstat:
-	proc_net_remove("snmp");
+	remove_proc_entry("snmp", proc_net);
 out_snmp:
 	remove_proc_entry("netstat", proc_net);
 out_netstat:

===================================================================


This BitKeeper patch contains the following changesets:
1.825
## Wrapped with gzip_uu ##


begin 664 bkpatch4864
M'XL(`'VVT3T``\U7;7/:1A#^+/V*+9DTQL&@%\1;ZC0..`EC.Z:R_<TSC"P=
MH+&D(W<'CEORW[M[`@$N3IQ,FRG&OMN]V]WG=I][\3.XDDQTC"!,F?D,/G"I
M.D;(,Q:J>!Y40YY6;P0.^)SC0&W"4U9[>U++F#IPJIZ)(X-`A1.8,R$[AEUU
M"XVZG[*.X1^_OSH]\DWS\!"ZDR`;LPNFX/#05%S,@R22;P(U27A652+(9,J4
MCKDHIBX<RW+PQ[.;KN4U%G;#JC<7H1W9=E"W660Y]5:C;A+\-P]A/_!BX\=Q
MR<_":;F-IMD#N]IR/+"<FFW7;`<<I^-Y'<<ZL)R.9<%.I_#2A@/+?`O_[@*Z
M9@@<XNF\W@$,B>E44)L*'E*J:S)+IQ@0)/LT',4),T^`EF";@W52S8/O_)BF
M%5CFZV\LA,(3+`VF&FXNI^VU%FZ]T6PO6+OAN&%SY+:MEM5R;W:G;J<O+(IK
M69YGM1:.VVQ8FBD/)GZ;+S^$\A'6/(*2N$,HK7:]Z6GN-!\RQVI]G3G-.AS4
MF_\#[NA$G\.!N--?Y,+@8<Y_@$Y]IP6V"?O&D<AP=1RZ53AC"3>,CM%=XMH$
MTK/M%CAFW[;;:"=5H.(0XDP!01[2-#GA=WM2B5FH"C/8QUX%YCR.8']>1B^.
M@^;]O#'(/GY%VCJN$]7U!C1,@ZRG`@='>]J\U)]VX!T7=X&(XFP,/38*9HFZ
MO#R%?N:SD,5S)K'[(1+'0G`AH60:AE'J9T=1H2+[7J""L0A2FGR5W6;\+AL(
MKOC:H!?+$*/0A!Y+8CHIX7RF?/9IQJ32_6)*;H.:C]SG,X40?!;(]#).&8JY
M@(;14G]^LC+1XKL@3A"5",8T0.U:TQ4L0'_7&2W\>83?4H4LJ>3#B,V1.*/J
M:)V0W\&&#C@5D/<R5,DPGN(LG:.A4DF9,EQOZ;QCXYD&FL)>#(=@O3(-H$\,
MOP$?C213?+0J(GI)XYL*#(?3("I##63\)\/A62;C<<8BP-TP+K^"^.7+,J+[
M1]7@>3++<6.`$4\BI`1+HKUM![!?QD":4!(Y);5!#FH5<`M/N0)Q62_)L\`F
M1C9L<+T=K,'TA2DFL)^=R3%5=,D$*JU45QDF.9R02!4[_AQ&:QH,`I$B,VYH
M]$*$?\Q8ED_U610+/"FTNW"RP1R2?#9=^<,%I=O"<I`H>1;(VVV2DD9/0#II
MM-@NX1+E-O$6M%O#1F&-&(4-R)J\*\R%:0Y]V5G%W8"]*>GAPG(-?T.@*<ML
ME[`TUT]F&%KD'(MF:7K_GW*,0CV)94M,*YY=[V3698C$\A4_2L9<Q&J2DG`6
M9[H)/@/^XBF:P1%=*NQ\RK)5#@>!E(7J2"F63E6^\X\1WHW/,$,2NC,AM%RP
MY(+EK-"MS_0MI/N:UWFA\83*H7U7%53XLS8Z17I*#9:(OEZ"JTCO[?69_I$/
MN%`;&YUVSFKT.LL325:4'>.IV9E%/RL[%.DIV5DB>IB=F0KSB"^NLQ>T0L'4
M3&2T.CPC73HK=UW;'(E8<#_C$=[9NL'+)%?F]SC]+9M_%5XEWCL)RZUIK++]
M$*C`QZO34T3Q!?$MPV[X(SN!2HY[H+`;<3QH#@%C5,FM@?TME)B1*IZ!D1Y`
M'?5)ER22L=N55@OYU`3O64;J'.M243&_4-)Z=JNNKT1L''.5Z1)<=@?OCKHG
M/N,B8H+$BVW19QE?BJ5MN\N+0M^SV_E#!YL'WGOD[SR)+AB6H9!'?$O&5\V\
MM,MNQ/,A#)"_Q]KT'GN<ODF<S3Y_!X%[CD.(^X[C@HO,RKW0,W.(M\@0,8I[
MV)\BO7`'33&YH7ZK#/4,/;I7PM<IE;Q4@8MAW[]Z?U[)':">+FY'/SW[U#B/
M^J#*/^+`B$>P]\NT3"[:VL7!:SV\)-"O6XS2M79<3X?4#5(XY?.=X3:B%/\;
8AQ,6WLI9>AAYS5$0NJ'Y-_3D536(#P``
`
end

^ permalink raw reply

* Re: [2.5-bk] Module loader compile bug
From: Brad Heilbrun @ 2002-11-13  2:13 UTC (permalink / raw)
  To: Rusty Russell; +Cc: linux-kernel, torvalds
In-Reply-To: <20021112172423.818182C2A0@lists.samba.org>

On Wed, Nov 13, 2002 at 04:23:26AM +1100, Rusty Russell wrote:
> In message <20021112050319.GA3651@paypal.com> you write:
> > I realize you're still working on this, but current bk is broken if
> > you turn off module unload support. In include/linux/module.h we get:
> > 
> > 	#else /*!CONFIG_MODULE_UNLOAD*/
> > <snip>
> > 	#define symbol_put_addr(p) do { } while(0)
> > 	
> > 	#endif /* CONFIG_MODULE_UNLOAD */
> > 	
> > Which upsets this line in kernel/module.c 
> > 
> > 	  void symbol_put_addr(void *addr)
> > 
> > After the preprocessor gets a hold of it all, gcc doesn't know what to
> > make of "void do { } while(0)".
> 
> Yep, symbol_put_addr() in module.c should be moved under __symbol_put.
> 
> Patch is fairly trivial, does this work for you?

Yes, thanks.

-- 
Brad Heilbrun

^ permalink raw reply

* [PATCH][2.5] init_timer for smc91c92cs_cs.c
From: Zwane Mwaikambo @ 2002-11-13  2:04 UTC (permalink / raw)
  To: Linux Kernel; +Cc: Linus Torvalds

Index: linux-2.5.47/drivers/net/pcmcia/smc91c92_cs.c
===================================================================
RCS file: /build/cvsroot/linux-2.5.47/drivers/net/pcmcia/smc91c92_cs.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 smc91c92_cs.c
--- linux-2.5.47/drivers/net/pcmcia/smc91c92_cs.c	11 Nov 2002 03:57:06 -0000	1.1.1.1
+++ linux-2.5.47/drivers/net/pcmcia/smc91c92_cs.c	13 Nov 2002 00:02:49 -0000
@@ -358,6 +358,7 @@
     memset(smc, 0, sizeof(struct smc_private));
     link = &smc->link; dev = &smc->dev;
     spin_lock_init(&smc->lock);
+    init_timer(&link->release);
     link->release.function = &smc91c92_release;
     link->release.data = (u_long)link;
     link->io.NumPorts1 = 16;

-- 
function.linuxpower.ca



^ permalink raw reply

* [PATCH] include/asm-ARCH/page.h:get_order() Reorganize and optimize
From: Inaky Perez-Gonzalez @ 2002-11-13  2:01 UTC (permalink / raw)
  To: alan, linux-kernel



Hi all

This patch is a reorganization and optimization of the get_order()
function.

Currently each architecture defines its version in
asm-${ARCH}/page.h, being most of them the same function. I have
unified the implementation in asm-generic/page.h, as
generic_get_order(). Then each arch can implement it's own version
or use the generic one [as the patch stands now, every
architecture that had the generic version uses
generic_get_oder()].

The optimization is done in the way the generic_get_order() is
implemented; currently it is a loop - however, that can be highly
optimized by using fls() [available on each architecture or as
generic_tls() where not optimized]. On my tests in a tight loop
doing repeated get_order() calls (see included test program), I
got an aprox average run time of 0.5 seconds for the optimized
version, versus an average of 1.45 for the old one. Almost 33%
better, not bad.

I was only able to test it and try it in ia32, so I don't know if
I broke anything else in other archs; reports welcome.

CAVEATS:

- the #include <asm-generic/page.h> ... I don't know if it is the
  best way to do it. Any ideas?

- Some arches still define fls() as the generic_fls(), instead of
  using bit-searching ASM instructions - I lack the knowledge to
  fix it, though.


Quickie-dirtie-test program:

compile with 'cc -DV# -O2 -g -o test-# test.c', where # is 0 for
the original version and 1 for the optimized version.

#include <asm/page.h>
#include <stdio.h>

#ifdef V0
int get_order(unsigned long size)
{
  int order;
  
  size = (size-1) >> (PAGE_SHIFT-1);
  order = -1;
  do {
    size >>= 1;
    order++;
  } while (size);
  return order;
}
#endif

#ifdef V1
static __inline__
int fls (int x)
{
	int r;

	__asm__("bsrl %1,%0\n\t"
		"jnz 1f\n\t"
		"movl $-1,%0\n"
		"1:" : "=r" (r) : "g" (x));
	return r+1;
}

#define likely(y) (y)

static __inline__
int get_order (unsigned long s)
{
    int exp;

    s = --s >> PAGE_SHIFT;
    if (s == 0)
      return 0;
    
    exp = fls (s);
    s = 1 << exp;
    if (likely (s) < s)
	exp++;
    return exp;
}
#endif

int main (void)
{
  unsigned long cnt, rep;
  unsigned long *pivot, pivots[] = {
    0x00001000, 0x00002000, 0x00004000, 0x00008000,
    0x00010000, 0x00020000, 0x00040000, 0x00080000,
    0x00100000, 0x00200000, 0x00400000, 0x00800000,
    0x01000000, 0x02000000, 0x04000000, 0x08000000,
    0x10000000, 0x20000000, 0x40000000, 0x80000000
  };

  for (pivot = pivots; pivot < pivots + sizeof (pivots) / sizeof (unsigned long); pivot++)
    for (rep = 0; rep < 400000; rep++)
      for (cnt = *pivot - 10; cnt < *pivot + 10; cnt++)
           cnt += get_order (cnt);
  return cnt;
}


This patch is against 2.5.47.


diff -u include/asm-alpha/page.h:1.1.1.1 include/asm-alpha/page.h:1.1.1.1.16.1
--- include/asm-alpha/page.h:1.1.1.1	Tue Oct  8 19:47:09 2002
+++ include/asm-alpha/page.h	Tue Nov 12 16:49:22 2002
@@ -67,18 +67,17 @@
 
 #define PAGE_BUG(page)	BUG()
 
-/* Pure 2^n version of get_order */
-extern __inline__ int get_order(unsigned long size)
-{
-	int order;
 
-	size = (size-1) >> (PAGE_SHIFT-1);
-	order = -1;
-	do {
-		size >>= 1;
-		order++;
-	} while (size);
-	return order;
+/* Return 'n' in how many 2^n pages are needed to store s bytes.
+** (n == 0 for s == 0)
+*/
+
+#include <asm-generic/page.h>
+
+static __inline__
+int get_order (unsigned long s)
+{
+        return generic_get_order (s);
 }
 
 #endif /* !__ASSEMBLY__ */

diff -u include/asm-arm/page.h:1.1.1.2 include/asm-arm/page.h:1.1.1.2.10.1
--- include/asm-arm/page.h:1.1.1.2	Thu Oct 17 13:08:30 2002
+++ include/asm-arm/page.h	Tue Nov 12 16:49:22 2002
@@ -175,18 +175,16 @@
 
 #endif
 
-/* Pure 2^n version of get_order */
-static inline int get_order(unsigned long size)
-{
-	int order;
+/* Return 'n' in how many 2^n pages are needed to store s bytes.
+** (n == 0 for s == 0)
+*/
+
+#include <asm-generic/page.h>
 
-	size = (size-1) >> (PAGE_SHIFT-1);
-	order = -1;
-	do {
-		size >>= 1;
-		order++;
-	} while (size);
-	return order;
+static __inline__
+int get_order (unsigned long s)
+{
+        return generic_get_order (s);
 }
 
 #include <asm/memory.h>

diff -u /dev/null include/asm-generic/page.h:1.1.2.1
--- /dev/null	Tue Nov 12 17:54:58 2002
+++ include/asm-generic/page.h	Tue Nov 12 16:49:22 2002
@@ -0,0 +1,27 @@
+#ifndef _GENERIC_PAGE_H
+#define _GENERIC_PAGE_H
+
+#include <asm/bitops.h>
+
+/* Return 'n' in how many 2^n pages are needed to store s bytes.
+** (n == 0 for s == 0)
+*/
+
+static __inline__
+int generic_get_order (unsigned long s)
+{
+        int exp;
+
+        s = --s >> PAGE_SHIFT;
+        if (s == 0)
+                return 0;
+    
+        exp = fls (s);
+        s = 1 << exp;
+        if (likely (s) < s)
+                exp++;
+        return exp;
+}
+
+#endif _GENERIC_PAGE_H
+

diff -u include/asm-i386/bitops.h:1.1.1.2 include/asm-i386/bitops.h:1.1.1.2.4.1
--- include/asm-i386/bitops.h:1.1.1.2	Mon Nov 11 20:02:12 2002
+++ include/asm-i386/bitops.h	Tue Nov 12 16:49:22 2002
@@ -414,11 +414,19 @@
 	return word;
 }
 
-/*
- * fls: find last bit set.
+/**
+ * __fls - find last bit in word.
+ * @word: The word to search
+ *
+ * Undefined if no bit exists, so code should check against 0 first.
  */
-
-#define fls(x) generic_fls(x)
+static __inline__ unsigned long __fls(unsigned long word)
+{
+	__asm__("bsrl %1,%0"
+		:"=r" (word)
+		:"rm" (word));
+	return word;
+}
 
 #ifdef __KERNEL__
 
@@ -454,6 +462,23 @@
 	int r;
 
 	__asm__("bsfl %1,%0\n\t"
+		"jnz 1f\n\t"
+		"movl $-1,%0\n"
+		"1:" : "=r" (r) : "g" (x));
+	return r+1;
+}
+
+/**
+ * fls - find last bit set
+ * @x: the word to search
+ *
+ * Check out comments for ffs()
+ */
+static __inline__ int fls(int x)
+{
+	int r;
+
+	__asm__("bsrl %1,%0\n\t"
 		"jnz 1f\n\t"
 		"movl $-1,%0\n"
 		"1:" : "=r" (r) : "g" (x));

diff -u include/asm-i386/page.h:1.1.1.2 include/asm-i386/page.h:1.1.1.2.10.1
--- include/asm-i386/page.h:1.1.1.2	Thu Oct 17 13:06:36 2002
+++ include/asm-i386/page.h	Tue Nov 12 16:49:22 2002
@@ -120,18 +120,17 @@
 	BUG(); \
 } while (0)
 
-/* Pure 2^n version of get_order */
-static __inline__ int get_order(unsigned long size)
-{
-	int order;
 
-	size = (size-1) >> (PAGE_SHIFT-1);
-	order = -1;
-	do {
-		size >>= 1;
-		order++;
-	} while (size);
-	return order;
+/* Return 'n' in how many 2^n pages are needed to store s bytes.
+** (n == 0 for s == 0)
+*/
+
+#include <asm-generic/page.h>
+
+static __inline__
+int get_order (unsigned long s)
+{
+        return generic_get_order (s);
 }
 
 #endif /* __ASSEMBLY__ */

diff -u include/asm-m68k/page.h:1.1.1.2 include/asm-m68k/page.h:1.1.1.2.4.1
--- include/asm-m68k/page.h:1.1.1.2	Mon Nov  4 18:10:53 2002
+++ include/asm-m68k/page.h	Tue Nov 12 16:49:22 2002
@@ -100,18 +100,17 @@
 /* to align the pointer to the (next) page boundary */
 #define PAGE_ALIGN(addr)	(((addr)+PAGE_SIZE-1)&PAGE_MASK)
 
-/* Pure 2^n version of get_order */
-extern __inline__ int get_order(unsigned long size)
-{
-	int order;
 
-	size = (size-1) >> (PAGE_SHIFT-1);
-	order = -1;
-	do {
-		size >>= 1;
-		order++;
-	} while (size);
-	return order;
+/* Return 'n' in how many 2^n pages are needed to store s bytes.
+** (n == 0 for s == 0)
+*/
+
+#include <asm-generic/page.h>
+
+static __inline__
+int get_order (unsigned long s)
+{
+        return generic_get_order (s);
 }
 
 #endif /* !__ASSEMBLY__ */

diff -u include/asm-m68knommu/page.h:1.1.2.1 include/asm-m68knommu/page.h:1.1.2.1.4.1
--- include/asm-m68knommu/page.h:1.1.2.1	Mon Nov  4 18:10:53 2002
+++ include/asm-m68knommu/page.h	Tue Nov 12 16:49:22 2002
@@ -51,19 +51,18 @@
 /* to align the pointer to the (next) page boundary */
 #define PAGE_ALIGN(addr)	(((addr)+PAGE_SIZE-1)&PAGE_MASK)
 
-/* Pure 2^n version of get_order */
-extern __inline__ int get_order(unsigned long size)
-{
-	int order;
+/* Return 'n' in how many 2^n pages are needed to store s bytes.
+** (n == 0 for s == 0)
+*/
+
+#include <asm-generic/page.h>
 
-	size = (size-1) >> (PAGE_SHIFT-1);
-	order = -1;
-	do {
-		size >>= 1;
-		order++;
-	} while (size);
-	return order;
+static __inline__
+int get_order (unsigned long s)
+{
+        return generic_get_order (s);
 }
+
 
 extern unsigned long memory_start;
 extern unsigned long memory_end;

diff -u include/asm-mips/page.h:1.1.1.1 include/asm-mips/page.h:1.1.1.1.16.1
--- include/asm-mips/page.h:1.1.1.1	Tue Oct  8 19:47:08 2002
+++ include/asm-mips/page.h	Tue Nov 12 16:49:22 2002
@@ -49,18 +49,16 @@
 #define __pgd(x)	((pgd_t) { (x) } )
 #define __pgprot(x)	((pgprot_t) { (x) } )
 
-/* Pure 2^n version of get_order */
-extern __inline__ int get_order(unsigned long size)
-{
-	int order;
+/* Return 'n' in how many 2^n pages are needed to store s bytes.
+** (n == 0 for s == 0)
+*/
+
+#include <asm-generic/page.h>
 
-	size = (size-1) >> (PAGE_SHIFT-1);
-	order = -1;
-	do {
-		size >>= 1;
-		order++;
-	} while (size);
-	return order;
+static __inline__
+int get_order (unsigned long s)
+{
+        return generic_get_order (s);
 }
 
 #endif /* _LANGUAGE_ASSEMBLY */

diff -u include/asm-parisc/page.h:1.1.1.2 include/asm-parisc/page.h:1.1.1.2.6.1
--- include/asm-parisc/page.h:1.1.1.2	Thu Oct 31 15:28:28 2002
+++ include/asm-parisc/page.h	Tue Nov 12 16:49:22 2002
@@ -53,19 +53,18 @@
 #define __pgd(x)	((pgd_t) { (x) } )
 #define __pgprot(x)	((pgprot_t) { (x) } )
 
-/* Pure 2^n version of get_order */
-extern __inline__ int get_order(unsigned long size)
-{
-	int order;
+/* Return 'n' in how many 2^n pages are needed to store s bytes.
+** (n == 0 for s == 0)
+*/
+
+#include <asm-generic/page.h>
 
-	size = (size-1) >> (PAGE_SHIFT-1);
-	order = -1;
-	do {
-		size >>= 1;
-		order++;
-	} while (size);
-	return order;
+static __inline__
+int get_order (unsigned long s)
+{
+        return generic_get_order (s);
 }
+
 
 #ifdef __LP64__
 #define MAX_PHYSMEM_RANGES 8 /* Fix the size for now (current known max is 3) */

diff -u include/asm-ppc64/page.h:1.1.1.1 include/asm-ppc64/page.h:1.1.1.1.16.1
--- include/asm-ppc64/page.h:1.1.1.1	Tue Oct  8 19:47:06 2002
+++ include/asm-ppc64/page.h	Tue Nov 12 16:49:22 2002
@@ -119,19 +119,18 @@
 
 #define PAGE_BUG(page) do { BUG(); } while (0)
 
-/* Pure 2^n version of get_order */
-static inline int get_order(unsigned long size)
-{
-	int order;
+/* Return 'n' in how many 2^n pages are needed to store s bytes.
+** (n == 0 for s == 0)
+*/
+
+#include <asm-generic/page.h>
 
-	size = (size-1) >> (PAGE_SHIFT-1);
-	order = -1;
-	do {
-		size >>= 1;
-		order++;
-	} while (size);
-	return order;
+static __inline__
+int get_order (unsigned long s)
+{
+        return generic_get_order (s);
 }
+
 
 #define __pa(x) ((unsigned long)(x)-PAGE_OFFSET)
 

diff -u include/asm-s390/page.h:1.1.1.1 include/asm-s390/page.h:1.1.1.1.16.1
--- include/asm-s390/page.h:1.1.1.1	Tue Oct  8 19:47:08 2002
+++ include/asm-s390/page.h	Tue Nov 12 16:49:22 2002
@@ -71,18 +71,16 @@
         BUG(); \
 } while (0)                      
 
-/* Pure 2^n version of get_order */
-extern __inline__ int get_order(unsigned long size)
-{
-        int order;
+/* Return 'n' in how many 2^n pages are needed to store s bytes.
+** (n == 0 for s == 0)
+*/
+
+#include <asm-generic/page.h>
 
-        size = (size-1) >> (PAGE_SHIFT-1);
-        order = -1;
-        do {
-                size >>= 1;
-                order++;
-        } while (size);
-        return order;
+static __inline__
+int get_order (unsigned long s)
+{
+        return generic_get_order (s);
 }
 
 /*

diff -u include/asm-s390x/page.h:1.1.1.1 include/asm-s390x/page.h:1.1.1.1.16.1
--- include/asm-s390x/page.h:1.1.1.1	Tue Oct  8 19:47:05 2002
+++ include/asm-s390x/page.h	Tue Nov 12 16:49:22 2002
@@ -69,18 +69,16 @@
         BUG(); \
 } while (0)                      
 
-/* Pure 2^n version of get_order */
-extern __inline__ int get_order(unsigned long size)
-{
-        int order;
+/* Return 'n' in how many 2^n pages are needed to store s bytes.
+** (n == 0 for s == 0)
+*/
+
+#include <asm-generic/page.h>
 
-        size = (size-1) >> (PAGE_SHIFT-1);
-        order = -1;
-        do {
-                size >>= 1;
-                order++;
-        } while (size);
-        return order;
+static __inline__
+int get_order (unsigned long s)
+{
+        return generic_get_order (s);
 }
 
 /*

diff -u include/asm-sh/page.h:1.1.1.1 include/asm-sh/page.h:1.1.1.1.16.1
--- include/asm-sh/page.h:1.1.1.1	Tue Oct  8 19:47:10 2002
+++ include/asm-sh/page.h	Tue Nov 12 16:49:22 2002
@@ -102,19 +102,18 @@
 	BUG(); \
 } while (0)
 
-/* Pure 2^n version of get_order */
-static __inline__ int get_order(unsigned long size)
-{
-	int order;
+/* Return 'n' in how many 2^n pages are needed to store s bytes.
+** (n == 0 for s == 0)
+*/
+
+#include <asm-generic/page.h>
 
-	size = (size-1) >> (PAGE_SHIFT-1);
-	order = -1;
-	do {
-		size >>= 1;
-		order++;
-	} while (size);
-	return order;
+static __inline__
+int get_order (unsigned long s)
+{
+        return generic_get_order (s);
 }
+
 
 #endif
 

diff -u include/asm-sparc/page.h:1.1.1.1 include/asm-sparc/page.h:1.1.1.1.16.1
--- include/asm-sparc/page.h:1.1.1.1	Tue Oct  8 19:47:09 2002
+++ include/asm-sparc/page.h	Tue Nov 12 16:49:22 2002
@@ -147,19 +147,18 @@
 
 #define TASK_UNMAPPED_BASE	BTFIXUP_SETHI(sparc_unmapped_base)
 
-/* Pure 2^n version of get_order */
-extern __inline__ int get_order(unsigned long size)
-{
-	int order;
+/* Return 'n' in how many 2^n pages are needed to store s bytes.
+** (n == 0 for s == 0)
+*/
+
+#include <asm-generic/page.h>
 
-	size = (size-1) >> (PAGE_SHIFT-1);
-	order = -1;
-	do {
-		size >>= 1;
-		order++;
-	} while (size);
-	return order;
+static __inline__
+int get_order (unsigned long s)
+{
+        return generic_get_order (s);
 }
+
 
 #else /* !(__ASSEMBLY__) */
 

diff -u include/asm-sparc64/page.h:1.1.1.2 include/asm-sparc64/page.h:1.1.1.2.6.1
--- include/asm-sparc64/page.h:1.1.1.2	Thu Oct 31 15:28:29 2002
+++ include/asm-sparc64/page.h	Tue Nov 12 16:49:22 2002
@@ -161,18 +161,16 @@
 
 extern struct sparc_phys_banks sp_banks[SPARC_PHYS_BANKS];
 
-/* Pure 2^n version of get_order */
-static __inline__ int get_order(unsigned long size)
-{
-	int order;
+/* Return 'n' in how many 2^n pages are needed to store s bytes.
+** (n == 0 for s == 0)
+*/
+
+#include <asm-generic/page.h>
 
-	size = (size-1) >> (PAGE_SHIFT-1);
-	order = -1;
-	do {
-		size >>= 1;
-		order++;
-	} while (size);
-	return order;
+static __inline__
+int get_order (unsigned long s)
+{
+        return generic_get_order (s);
 }
 
 #endif /* !(__ASSEMBLY__) */

diff -u include/asm-v850/page.h:1.1.2.1 include/asm-v850/page.h:1.1.2.1.4.1
--- include/asm-v850/page.h:1.1.2.1	Mon Nov  4 18:10:54 2002
+++ include/asm-v850/page.h	Tue Nov 12 16:49:22 2002
@@ -98,19 +98,18 @@
 #define BUG()		__bug()
 #define PAGE_BUG(page)	__bug()
 
-/* Pure 2^n version of get_order */
-extern __inline__ int get_order (unsigned long size)
-{
-	int order;
+/* Return 'n' in how many 2^n pages are needed to store s bytes.
+** (n == 0 for s == 0)
+*/
+
+#include <asm-generic/page.h>
 
-	size = (size-1) >> (PAGE_SHIFT-1);
-	order = -1;
-	do {
-		size >>= 1;
-		order++;
-	} while (size);
-	return order;
+static __inline__
+int get_order (unsigned long s)
+{
+        return generic_get_order (s);
 }
+
 
 #endif /* !__ASSEMBLY__ */
 

diff -u include/asm-x86_64/page.h:1.1.1.2 include/asm-x86_64/page.h:1.1.1.2.10.1
--- include/asm-x86_64/page.h:1.1.1.2	Thu Oct 17 13:08:31 2002
+++ include/asm-x86_64/page.h	Tue Nov 12 16:49:22 2002
@@ -80,19 +80,18 @@
 #define PAGE_BUG(page) BUG()
 void out_of_line_bug(void);
 
-/* Pure 2^n version of get_order */
-extern __inline__ int get_order(unsigned long size)
-{
-	int order;
+/* Return 'n' in how many 2^n pages are needed to store s bytes.
+** (n == 0 for s == 0)
+*/
+
+#include <asm-generic/page.h>
 
-	size = (size-1) >> (PAGE_SHIFT-1);
-	order = -1;
-	do {
-		size >>= 1;
-		order++;
-	} while (size);
-	return order;
+static __inline__
+int get_order (unsigned long s)
+{
+        return generic_get_order (s);
 }
+
 
 #endif /* __ASSEMBLY__ */
 


-- 

Inaky Perez-Gonzalez -- Not speaking for Intel - opinions are my own [or my fault]

^ permalink raw reply

* [PATCH][2.5] init_timer for mcast.c/mca_timer
From: Zwane Mwaikambo @ 2002-11-13  1:59 UTC (permalink / raw)
  To: Linux Kernel; +Cc: Arnaldo Carvalho de Melo

Index: linux-2.5.47/net/ipv6/mcast.c
===================================================================
RCS file: /build/cvsroot/linux-2.5.47/net/ipv6/mcast.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 mcast.c
--- linux-2.5.47/net/ipv6/mcast.c	11 Nov 2002 03:59:07 -0000	1.1.1.1
+++ linux-2.5.47/net/ipv6/mcast.c	12 Nov 2002 23:22:44 -0000
@@ -298,6 +298,7 @@
 	memset(mc, 0, sizeof(struct ifmcaddr6));
 	mc->mca_timer.function = igmp6_timer_handler;
 	mc->mca_timer.data = (unsigned long) mc;
+	init_timer(&mc->mca_timer);
 
 	memcpy(&mc->mca_addr, addr, sizeof(struct in6_addr));
 	mc->idev = idev;

-- 
function.linuxpower.ca


^ permalink raw reply

* Re: PATCH 2.4: scsi and BLK_STATS
From: Christoph Hellwig @ 2002-11-13  2:03 UTC (permalink / raw)
  To: Matthias Urlichs; +Cc: linux-kernel
In-Reply-To: <20021113024118.M18881@noris.de>

On Wed, Nov 13, 2002 at 02:41:18AM +0100, Matthias Urlichs wrote:
> > It already gets genhd.h through blk.h -> blkdev.h.. :)
> 
> ... then why did I get that undefined symbol in scsi_mod.o, I wonder ??

I can't reproduce it here, so I wonder, too.  Can you send me you
.config offlist?


^ permalink raw reply

* Re: [LARTC] Can Athlon Thunderbird 1.4GHZ use PSCHED_CPU?
From: Pedro Larroy @ 2002-11-13  1:54 UTC (permalink / raw)
  To: lartc
In-Reply-To: <marc-lartc-103686345710584@msgid-missing>

[-- Attachment #1: Type: text/plain, Size: 1189 bytes --]

On Sat, Nov 09, 2002 at 09:36:43AM -0800, gypsy wrote:
> The docs in linux/include/net/sched/pkt_sched.h and in tc/README.last 
> only speak about Intel CPUs.  Can I use PSCHED_CPU with my Athlon 
> Thunderbird 1.4GHZ CPU?

Yes.


> 
> A better question is: What Bad Thing Happens when
> #define PSCHED_CLOCK_SOURCE PSCHED_CPU 
> but there is no timestamp counter (TSC) or the TSC is broken?
> 
> How would I know?

try or read proccessor specs

> 
> TIA,
> gypsy
> --
> A: Because it reverses the logical flow of conversation.
> Q: Why is top posting frowned upon?
> _______________________________________________
> LARTC mailing list / LARTC@mailman.ds9a.nl
> http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

-- 
O   _____________________________________________________________   O
|  /-| Pedro Larroy Tovar. PiotR | http://omega.resa.es/piotr  |-\  |
| /--|            No MS-Office attachments please.             |--\ |
o-|--|              e-mail: piotr@omega.resa.es                |--|-o 
   \-|   finger piotr@omega.resa.es for public key and info    |-/  
    -------------------------------------------------------------

[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]

^ permalink raw reply

* Re: [PATCH] kprobes for 2.5.47
From: Rusty Lynch @ 2002-11-13  1:58 UTC (permalink / raw)
  To: vamsi; +Cc: rusty, lkml
In-Reply-To: <20021112165053.A1342@in.ibm.com>

When register_kprobe() is called with a bad addr, we crash the kernel.
Should it be the reponsibility of the caller, or the kernel to make sure the
addr is ok?

The kernel could check by adding a

+unsigned short tmp;
....
+if(__get_user(tmp, (unsigned short *)p->addr)) {
+        ret = -EINVAL;
+        goto out;
+}

to register_kprobe()

> +int register_kprobe(struct kprobe *p)
> +{
> + int ret = 0;
> +
> + spin_lock_irq(&kprobe_lock);
> + if (get_kprobe(p->addr)) {
> + ret = -EEXIST;
> + goto out;
> + }
> + list_add(&p->list, &kprobe_table[hash_ptr(p->addr, KPROBE_HASH_BITS)]);
> +
> + p->opcode = *p->addr;
> + *p->addr = BREAKPOINT_INSTRUCTION;
> + flush_icache_range(p->addr, p->addr + sizeof(kprobe_opcode_t));
> + out:
> + spin_unlock_irq(&kprobe_lock);
> + return ret;
> +}

BTW, I have a stupid little sample char driver that reads in address/message
pairs and then adds a probe that printk's the message at the address.  This
was just my way of learning how to use kprobes.  Should I post it?  I would
love to get feedback on what I did wrong, but I hate to spam the list.

    -rustyl


^ permalink raw reply

* [PATCHSET] Linux 2.4.20-rc1-jam2
From: J.A. Magallón @ 2002-11-13  1:41 UTC (permalink / raw)
  To: Lista Linux-Kernel

Hi all...

Just to public a new relase ;).

Changes/updates/new things:

- update to official rc1-aa1
- reverted the pte_fast changes in -aa. It cured my hangs on X logoff with
  nvidia driver. Perhaps some bug when gart releases pages ??
- add the force_inline patch from Denis Vlasenko, with some additions for
  __copy_[to,from]_user
- kmsgdump-0.4.4 by  Willy Tarreau: dump oopsen to floppy/console...
- proconfig-0.9.5 by Peter T. Breuer: store .config in /proc/config
- bttv updates and missing files
- bproc 3.2.2

More info on
http://giga.cps.unizar.es/~magallon/linux/kernel/2.4.20-rc1-jam2/README.txt

Get it at 

http://giga.cps.unizar.es/~magallon/linux/kernel/2.4.20-rc1-jam2/
http://giga.cps.unizar.es/~magallon/linux/kernel/2.4.20-rc1-jam2.tar.gz

Enjoy !!

-- 
J.A. Magallon <jamagallon@able.es>      \                 Software is like sex:
werewolf.able.es                         \           It's better when it's free
Mandrake Linux release 9.1 (Cooker) for i586
Linux 2.4.20-rc1-jam2 (gcc 3.2 (Mandrake Linux 9.1 3.2-3mdk))

^ permalink raw reply

* Re: PATCH 2.4: scsi and BLK_STATS
From: Matthias Urlichs @ 2002-11-13  1:41 UTC (permalink / raw)
  To: Christoph Hellwig, linux-kernel
In-Reply-To: <20021113013717.A3008@infradead.org>

Hi,

Christoph Hellwig:
> > anyway, please disregard my patch and add
> > 
> > #include <linux/genhd.h>
> > 
> > in scsi/scsi_lib.c.  :-/
> 
> It already gets genhd.h through blk.h -> blkdev.h.. :)

... then why did I get that undefined symbol in scsi_mod.o, I wonder ??

-- 
Matthias Urlichs     |     noris network AG     |     http://smurf.noris.de/

^ permalink raw reply

* Re: [patch] Fix asm-i386/topology.h
From: Matthew Dobson @ 2002-11-13  1:35 UTC (permalink / raw)
  To: Linus Torvalds, Martin Bligh; +Cc: linux-kernel
In-Reply-To: <3DD18FB3.8060605@us.ibm.com>

[-- Attachment #1: Type: text/plain, Size: 673 bytes --]

We'll give this another shot, with the patch attatched this time.

Cheers!

-Matt

Matthew Dobson wrote:
> Linus,
>     This patch fixes some slow, quickly written macros in 
> asm-i386/topology.h.  The new versions use value caching in arrays to 
> greatly speed up topology queries.
> 
> Please apply.
> 
> [mcd@arrakis patches]$ diffstat i386_topology_fixup-2.5.47.patch
>  arch/i386/kernel/smpboot.c  |   43 
> +++++++++++++++++++++++++++++++++++++++++++
>  include/asm-i386/smpboot.h  |    8 ++++++++
>  include/asm-i386/topology.h |   43 
> +++++--------------------------------------
>  3 files changed, 56 insertions(+), 38 deletions(-)
> 
> Cheers!
> 
> -Matt
> 


[-- Attachment #2: i386_topology_fixup-2.5.47.patch --]
[-- Type: text/plain, Size: 5189 bytes --]

diff -Nur --exclude-from=/usr/src/.dontdiff linux-2.5.46-vanilla/arch/i386/kernel/smpboot.c linux-2.5.46-i386_topo_fix/arch/i386/kernel/smpboot.c
--- linux-2.5.46-vanilla/arch/i386/kernel/smpboot.c	Mon Nov  4 14:30:27 2002
+++ linux-2.5.46-i386_topo_fix/arch/i386/kernel/smpboot.c	Mon Nov  4 16:43:49 2002
@@ -501,6 +501,46 @@
 	return do_fork(CLONE_VM|CLONE_IDLETASK, 0, &regs, 0, NULL);
 }
 
+#ifdef CONFIG_X86_NUMAQ
+/* which logical CPUs are on which nodes */
+volatile unsigned long node_2_cpu_mask[MAX_NR_NODES];
+/* which node each logical CPU is on */
+volatile int cpu_2_node[NR_CPUS];
+
+/* Initialize all maps between cpu number and node */
+static inline void init_cpu_to_node_mapping(void)
+{
+	int node, cpu;
+
+	for (node = 0; node < MAX_NR_NODES; node++) {
+		node_2_cpu_mask[node] = 0;
+	}
+	for (cpu = 0; cpu < NR_CPUS; cpu++) {
+		cpu_2_node[cpu] = -1;
+	}
+}
+
+/* set up a mapping between cpu and node. */
+static inline void map_cpu_to_node(int cpu, int node)
+{
+	node_2_cpu_mask[node] |= (1 << cpu);
+	cpu_2_node[cpu] = node;
+}
+
+/* undo a mapping between cpu and node. */
+static inline void unmap_cpu_to_node(int cpu, int node)
+{
+	node_2_cpu_mask[node] &= ~(1 << cpu);
+	cpu_2_node[cpu] = -1;
+}
+#else /* !CONFIG_X86_NUMAQ */
+
+#define init_cpu_to_node_mapping()	({})
+#define map_cpu_to_node(cpu, node)	({})
+#define unmap_cpu_to_node(cpu, node)	({})
+
+#endif /* CONFIG_X86_NUMAQ */
+
 /* which physical APIC ID maps to which logical CPU number */
 volatile int physical_apicid_2_cpu[MAX_APICID];
 /* which logical CPU number maps to which physical APIC ID */
@@ -524,6 +564,7 @@
 		cpu_2_physical_apicid[cpu] = -1;
 		cpu_2_logical_apicid[cpu] = -1;
 	}
+	init_cpu_to_node_mapping();
 }
 
 static inline void map_cpu_to_boot_apicid(int cpu, int apicid)
@@ -535,6 +576,7 @@
 	if (clustered_apic_mode) {
 		logical_apicid_2_cpu[apicid] = cpu;	
 		cpu_2_logical_apicid[cpu] = apicid;
+		map_cpu_to_node(cpu, apicid >> 4);
 	} else {
 		physical_apicid_2_cpu[apicid] = cpu;	
 		cpu_2_physical_apicid[cpu] = apicid;
@@ -550,6 +592,7 @@
 	if (clustered_apic_mode) {
 		logical_apicid_2_cpu[apicid] = -1;	
 		cpu_2_logical_apicid[cpu] = -1;
+		unmap_cpu_to_node(cpu, apicid >> 4);
 	} else {
 		physical_apicid_2_cpu[apicid] = -1;	
 		cpu_2_physical_apicid[cpu] = -1;
diff -Nur --exclude-from=/usr/src/.dontdiff linux-2.5.46-vanilla/include/asm-i386/smpboot.h linux-2.5.46-i386_topo_fix/include/asm-i386/smpboot.h
--- linux-2.5.46-vanilla/include/asm-i386/smpboot.h	Mon Nov  4 14:30:51 2002
+++ linux-2.5.46-i386_topo_fix/include/asm-i386/smpboot.h	Mon Nov  4 16:43:49 2002
@@ -23,6 +23,14 @@
  #define boot_cpu_apicid boot_cpu_physical_apicid
 #endif /* CONFIG_CLUSTERED_APIC */
 
+#ifdef CONFIG_X86_NUMAQ
+/*
+ * Mappings between logical cpu number and node number
+ */
+extern volatile unsigned long node_2_cpu_mask[];
+extern volatile int cpu_2_node[];
+#endif /* CONFIG_X86_NUMAQ */
+
 /*
  * Mappings between logical cpu number and logical / physical apicid
  * The first four macros are trivial, but it keeps the abstraction consistent
diff -Nur --exclude-from=/usr/src/.dontdiff linux-2.5.46-vanilla/include/asm-i386/topology.h linux-2.5.46-i386_topo_fix/include/asm-i386/topology.h
--- linux-2.5.46-vanilla/include/asm-i386/topology.h	Mon Nov  4 14:30:10 2002
+++ linux-2.5.46-i386_topo_fix/include/asm-i386/topology.h	Mon Nov  4 16:43:49 2002
@@ -32,7 +32,7 @@
 #include <asm/smpboot.h>
 
 /* Returns the number of the node containing CPU 'cpu' */
-#define __cpu_to_node(cpu) (cpu_to_logical_apicid(cpu) >> 4)
+#define __cpu_to_node(cpu) (cpu_2_node[cpu])
 
 /* Returns the number of the node containing MemBlk 'memblk' */
 #define __memblk_to_node(memblk) (memblk)
@@ -41,44 +41,11 @@
    so it is a pretty simple function! */
 #define __parent_node(node) (node)
 
-/* Returns the number of the first CPU on Node 'node'.
- * This should be changed to a set of cached values
- * but this will do for now.
- */
-static inline int __node_to_first_cpu(int node)
-{
-	int i, cpu, logical_apicid = node << 4;
-
-	for(i = 1; i < 16; i <<= 1)
-		/* check to see if the cpu is in the system */
-		if ((cpu = logical_apicid_to_cpu(logical_apicid | i)) >= 0)
-			/* if yes, return it to caller */
-			return cpu;
-
-	BUG(); /* couldn't find a cpu on given node */
-	return -1;
-}
-
-/* Returns a bitmask of CPUs on Node 'node'.
- * This should be changed to a set of cached bitmasks
- * but this will do for now.
- */
-static inline unsigned long __node_to_cpu_mask(int node)
-{
-	int i, cpu, logical_apicid = node << 4;
-	unsigned long mask = 0UL;
-
-	if (sizeof(unsigned long) * 8 < NR_CPUS)
-		BUG();
-
-	for(i = 1; i < 16; i <<= 1)
-		/* check to see if the cpu is in the system */
-		if ((cpu = logical_apicid_to_cpu(logical_apicid | i)) >= 0)
-			/* if yes, add to bitmask */
-			mask |= 1 << cpu;
+/* Returns a bitmask of CPUs on Node 'node'. */
+#define __node_to_cpu_mask(node) (node_2_cpu_mask[node])
 
-	return mask;
-}
+/* Returns the number of the first CPU on Node 'node'. */
+#define __node_to_first_cpu(node) (__ffs(__node_to_cpu_mask(node)))
 
 /* Returns the number of the first MemBlk on Node 'node' */
 #define __node_to_memblk(node) (node)

^ permalink raw reply

* Re: [ANNOUNCE] MegaRAID RAID driver version 2.00 - introduced as new megaraid2 in 2.4.x and 2.5.x
From: Christoph Hellwig @ 2002-11-13  1:33 UTC (permalink / raw)
  To: Mukker, Atul; +Cc: linux-scsi, linux-kernel
In-Reply-To: <0E3FA95632D6D047BA649F95DAB60E570185ED7B@EXA-ATLANTA.se.lsil.com>

[could you cut down the Cc list to something reasonable next time?]

On Tue, Nov 12, 2002 at 08:24:57PM -0500, Mukker, Atul wrote:
> Alan et al,
> 
> Attached please find the megaraid driver version 2.00, which is to be
> introduced as megaraid2 in 2.4.x and 2.5.x kernels. The mail has two
> attachments:
> 1.	megaraid v200 for 2.4.x kernels - megaraid2-v200.tar.gz
> 2.	patch for 2.5.x kernels - megaraid2-v200-24x-25x.patch.gz
> 
> Other people on linux lists: Driver is not attached for lists. Please await
> announcement from Matt Domsch after he has updated the appropriate download
> sites.

Please don't add another driver.  From what I've seen the megaraid2
is nothing but the bugfixes/partial rewrite RH did for their Advanced
Server.  Just add it to 2.5 and maybe 2.4-ac instead of the current driver,
if it proves stable it can go into 2.4 later.


^ permalink raw reply

* Re: Is dropping all ICMP traffic valid?
From: Peter E. Fry @ 2002-11-13  1:32 UTC (permalink / raw)
  To: netfilter
In-Reply-To: <20021113010119.NUVS26478.mta05-svc.ntlworld.com@there>

On 13 Nov 2002 at 1:01, Antony Stone wrote:

> ICMP type 3 code 4 is Source Quench - not very common these days, but
> important to let through if you run systems which use it.

  The only stack I've seen use source quench is the old Mac stack, 
and it sent 'em gratuitously.  Funny -- I can't bloody well remember 
how I found that out.  I must've shared a LAN with a Mac at some 
point.
  I just wanted to point that out, to those who see lots of 
"quenches" on the Internet.  I'd never advocate dropping all ICMP.

[...]

Peter E. Fry



^ permalink raw reply

* Re: PATCH 2.4: scsi and BLK_STATS
From: Christoph Hellwig @ 2002-11-13  1:37 UTC (permalink / raw)
  To: Matthias Urlichs; +Cc: Christoph Hellwig, linux-kernel
In-Reply-To: <20021113023059.K18881@noris.de>

On Wed, Nov 13, 2002 at 02:30:59AM +0100, Matthias Urlichs wrote:
> That may be a matter of style, but I would strongly prefer these to be
> 
> #define req_new_io(_a,_b,_c) do {} while(0)
> #define req_merge_io(_a)     do {} while(0)
> #define req_finished_io(_a)  do {} while(0)
> 
> instead ...

In kernelspace inlines are usually preferred over macros, that's why
I wrote it that way.  I must adimt that I don't really care a lot
personally..

> anyway, please disregard my patch and add
> 
> #include <linux/genhd.h>
> 
> in scsi/scsi_lib.c.  :-/

It already gets genhd.h through blk.h -> blkdev.h.. :)


^ 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.