Linux-Development-Sys Digest #749, Volume #6     Thu, 27 May 99 17:14:18 EDT

Contents:
  Re: read() not interrupted by SIGINT in linux? why? (Andrew Gierth)
  Re: RedHat 6.0 SMP compile (Rolf Welde Skeie)
  [Q] Is task->priority for time slice ? ("Soohyung Lee")
  Re: read() not interrupted by SIGINT in linux? why? ([EMAIL PROTECTED])
  Re: [Q] Priority Mechanism in Linux (lckun)
  Re: Initrd (Dave Weis)
  Simple prog for parallel port ?? (Andrew Daviel)
  2.2.9 stopping network (Bill Woessner)
  Re: Anyway to recover origianl kernel source from RH6.0-ified kernel-source? (Jamie 
Walker)
  Re: Programming the M68HC11 MCU with Linux Hosts (Andrew Burgess)
  Re: SMP: Inconsistent variable MTRR settings ??? (Rolf Welde Skeie)
  Re: Initrd (Warren Little)
  C++ IDE ? ("Manohar Singh")
  Re: LINUX ability to handle large beowulf clusters ("m.benndorf")
  Can I call system function directly ? ("Hui-ung Kwon")
  Re: SMP needlessly migrating processes between processors? (Arun Sharma)

----------------------------------------------------------------------------

From: Andrew Gierth <[EMAIL PROTECTED]>
Crossposted-To: comp.unix.programmer
Subject: Re: read() not interrupted by SIGINT in linux? why?
Date: 27 May 1999 14:39:02 +0100

>>>>> "red" == red october <[EMAIL PROTECTED]> writes:

 red> I found some curious behaviour on linux during simple
 red> reads... when a SINGIN is sent, linux doesn't seem to want to
 red> interrupt the read and set errno to EINTR, as the man page says
 red> it should.  The right signal handler is called, but Linux plonks
 red> me back into the original read!

Don't ever use signal() for catching signals; the behaviour is too
variable between platforms.

Use sigaction() instead. That way, you can explicitly set, or not set,
the SA_RESTART flag that controls whether an interrupted system call is
restarted after a signal.

-- 
Andrew.

comp.unix.programmer FAQ: see <URL: http://www.erlenstar.demon.co.uk/unix/>
                           or <URL: http://www.whitefang.com/unix/>

------------------------------

From: Rolf Welde Skeie <[EMAIL PROTECTED]>
Subject: Re: RedHat 6.0 SMP compile
Date: Thu, 27 May 1999 14:37:57 +0200

Wendell Nichols wrote:
> I have an ASUS dual pentium II, 400.  I've installed rh60 on it and it works,
> but comes with smp turned off by default.  So I make config (turn on smp), make
> clean, bzImage, modules, modules_install etc.
> As a precaution I do a depmod -a 2.2.5-15smp, and every single configured module
> gets an "invalid reference in xxxxx.o" error.  Recompile without smp and all is
> fine, (except that one of my processors waits at the speed of light  :(
> If I boot the smp image, it gets to the point where it does the "module
> dependancies" ( I forget the exact wording )
> and hangs hard.  Won't ctrl/alt/del, has to be reset.
> Has anyone else seen this behavior?  I think there is just something wrong with
> the smp modules compile.

No, there is nothing wrong with the SMP support.
The problem lies in the proper procedure (which of course is
undocumented...).

Please do the following steps:

Change the EXTRAVERSION variable in /usr/src/linux/Makefile to something
unique, e.g. add "smp":
EXTRAVERSION = -18smp

# cd /usr/src/linux
# make mrproper
# make menuconfig

Enable SMP support

# make dep
# make bzImage
# make install

You should now have two files under /boot with your EXTRAVERSION:
/boot/System.map-2.2.5-18smp
/boot/vmlinuz-2.2.5-18smp

# make modules

Check that there is no previous directory called
/lib/modules/2.2.5-18smp. Remove it if not!

# make modules_install

Update your /etc/lilo.conf and add a new image with a new label, e.g:

default=linux-smp
image=/boot/vmlinuz-2.2.5-18smp
        label=linux-smp
        root=/dev/hda1
        read-only

# lilo

You should now be all set to reboot with the new glorious smp kernel.
The nice thing about this is that you can switch back and forth
between several kernels without ever having stange module depency
problems. EXTRAVERSION is your friend!

Good luck!
-- 
 Rolf Welde Skeie              Senior Design Engineer
_____________________________________________________________________
 Email : mailto:[EMAIL PROTECTED]   Scali AS (http://www.scali.com)
 Tlf   : (+47) 6384 6705       Hvamstubben 17                  oo
 Fax   : (+47) 6384 4005       2013 Skjetten      __________ m/V\> _
 Home  : (+47) 2214 8987       NORWAY               . . :: . 077-0
 Mob   : (+47) 9248 4511                      ----------------------

------------------------------

From: "Soohyung Lee" <[EMAIL PROTECTED]>
Subject: [Q] Is task->priority for time slice ?
Date: Thu, 27 May 1999 21:42:45 +0900

There is the following stuff in the sched.c

/* move an exhausted RR process to be last.. */

if (!prev->counter && prev->policy == SCHED_RR) {
        prev->counter = prev->priority;
        move_last_runqueue(prev);
}

Does " prev->counter = prev->priority " means that
priority is used for time slice ?

Thanks in advance .

- Lee -





------------------------------

From: [EMAIL PROTECTED]
Crossposted-To: comp.unix.programmer
Subject: Re: read() not interrupted by SIGINT in linux? why?
Date: Thu, 27 May 1999 14:56:42 GMT

You've gotten a lot of good advice already on using sigaction.  If you
need more details I would suggest you pick up a copy of "Advanced
Programing in the UNIX Environment" by W. Richard Stevens.
Chapter.section 10.11 Signal Sets and 10.14 sigaction Function contain
the information you will need to get started.

The book is a bit /pricey/ but I highly recommended it.  It is
invaluable for the kind of programming you want to do.

--Peter


--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---

------------------------------

From: lckun <[EMAIL PROTECTED]>
Subject: Re: [Q] Priority Mechanism in Linux
Date: Fri, 28 May 1999 01:16:23 +0900



Soohyung Lee wrote:

> The following symbols(variables) are defined in task_struct in
> <kernel/sched.c>
>    - counter

counter variable holds the time in ticks for which the process can still
run.
Scheduler uses the value of counter to select the next process.
counter is something like dynamic priority of a process.

>
>    - priority

Priority holds the static priority of a process.

>
>    - rt_priority

real-time priority, when a process with higher priority will run, all other
process with lower priorities should be aside.


lee

>
> and
>    - sched_priority ( in sched_param )
> .
>
> What the exact meaning of each symbol ?
> As far as I know, the 'counter' is for dynamic priority ( by goodness() ) ,
> and
> priority is somewhat static ( according to the scheduling class ,
> e.g. SCHED_OTHER,SCHED_RR,and SCHED_FIFO. )
>
> That's all I know and I want to know more .
>
> Can you tell me the relations between these symbols ?
> Can you tell me the mechanism for the tasks' priority and for real-time
> tasks ?
>
> I want to know precisely the priority mechanism in Linux .
> I really need your help .
> Thanks in advance .
>
> - Lee -


------------------------------

From: Dave Weis <[EMAIL PROTECTED]>
Subject: Re: Initrd
Date: Fri, 28 May 1999 11:40:02 -0500


> > This doesn=B4t help at all, it just says
> >
> > "/linuxrc : /bin/mount :not found
> >  /linuxrc : /bin/zcat : not found
> >  /linuxrc : /bin/umount : not found
> >  ...
> >  Kernel panic : Unable to mount root filesystem"

you are probably missing the dynamic libraries. that will give
approximately the same error message. run ldd filename to see which
libraries it depends on.

>                 I am having the same problem.   I noticed that if I put a=
n echo
> in linuxrc it is executed fine,

echo is a shell builtin. it should always work.

>                 and it returns ":/bin:/usr/bin".  When I execute pwd I ge=
t back
> "can't execute /bin/pwd", so it knows

library problems.


djweis


--=20
David Weis                | 10520 New York Ave, Des Moines, IA 50322
[EMAIL PROTECTED]      | Voice 515-278-0133 Ext 231

When they took the Fourth Amendment, I was quiet because I didn't deal drug=
s.
When they took the Sixth Amendment, I was quiet because I was innocent.
When they took the Second Amendment, I was quiet because I didn't own a gun=
=2E
Now they've taken the First Amendment and I can't say anything.


------------------------------

From: [EMAIL PROTECTED] (Andrew Daviel)
Subject: Simple prog for parallel port ??
Date: 26 May 1999 22:46:52 GMT

I'm looking for a simple program which access the parallel port to steal
code from.

I've found cqcam.c, which does things suid in user mode, in C++,
and the kernel parport module, but these are a bit too complex.
Frankly, I'm not too strong in C, and much less so in C++.
I just want to be able to toggle some bits up and down
and don't need the code portable to different hardware or O/S.
I suspect a few calls to outb would do the job if I set things
up right.



--
Deniable unless digitally signed
Andrew Daviel, TRIUMF, Canada
Tel. +1 (604) 222-7376
http://andrew.triumf.ca/andrew 

------------------------------

From: Bill Woessner <[EMAIL PROTECTED]>
Subject: 2.2.9 stopping network
Date: Thu, 27 May 1999 12:27:29 -0500

I'm running kernel 2.2.9 on an older P133 with 48 MB of RAM and a 3c509
network card.  Every now and then, the network simply stops.  Expecially
when I try to upload stuff off of the computer.  I looked in the change
log for the driver and it hasn't changed in over a year.  After
reverting to the 2.2.5 kernel, everything worked fine again.  I'm happy,
but I definitely think there's probably some bigger problem in the
kernel.


-- 
Bill Woessner
National Instruments
Ein Weiser prueft und achtet nicht, was der gemeine Poebel spricht.

------------------------------

From: Jamie Walker <[EMAIL PROTECTED]>
Subject: Re: Anyway to recover origianl kernel source from RH6.0-ified kernel-source?
Date: Thu, 27 May 1999 13:28:01 +0100

In article <[EMAIL PROTECTED]>, David T. Blake
<[EMAIL PROTECTED]> writes
>Jamie Walker <[EMAIL PROTECTED]> writes:
>
>>I've just upgraded to Redhat 6.0, mainly for the 2.2 kernel. My problem
>>is, the kernel-source-2.2.5-15.rpm package distributed on the CD
>>contains a modified source tree, and the patches from kernel.org fail on
>>it :(
>>
>>Is there any way to undo the modifications made by the Redhat team, so
>>that I can apply the diff patches and move to 2.2.9 without having to
>>download the whole thing?
>
>Try this. Stop and get a six pack.
>Start a download. Open a beer. 
>By the time you finish the beer, you should have a 
>kernel source.
>
:)

I was hoping not to have to download it - we have a terrible phone line
and here in the UK we pay per minute for Internet calls.


I guess I'll just head over to www.uk.kernel.org and get the beast... :)
-- 
Jamie Walker,                     http://www.howgarth.demon.co.uk/
LaL Computers: http://lal.rvx.net/ <- for cheap computer hardware.
"You're one of those condescending Unix computer users!"
"Here's a nickel, kid.  Get yourself a better computer" - Dilbert.

------------------------------

From: [EMAIL PROTECTED] (Andrew Burgess)
Crossposted-To: comp.arch.embedded,sci.electronics
Subject: Re: Programming the M68HC11 MCU with Linux Hosts
Date: 27 May 1999 09:44:36 -0700

In <7g3tsk$9f1$[EMAIL PROTECTED]> Rafael R. Sevilla <[EMAIL PROTECTED]> 
writes:

>I was wondering what is the proper way to program the M68HC11 family of
>microcontrollers with a Linux (or any Unix variant with termios-compatible
>serial programming facilities for that matter) host, in particular sending
>programs via its special bootstrap mode.  Following the Linux
>Serial-Programming-HOWTO, I was able to do this successfully, but oddly, the
>same code that runs on my Linux notebook stoutly refuses to run anywhere else.
>The serial port devices can't even be opened (and yes, the permissions are
>properly set). 

What is the error returned? "No such device or address" means the driver 
isn't compiled into the kernel.

>And it doesn't run particularly well on my notebook either.  It
>takes an unreasonably long time to start up and download a single 256-byte
>bootstrap program, which should take just under three seconds at 1200 baud,
>including the verification characters, but times in excess of 10 seconds are
>common.  It eventually *works*, I must emphasize, and later uses of the serial
>port don't seem to suffer from these effects (once my own programs are running
>on the chip, that is).  It's very frustrating.

Is local echo set the way you want it. This bit me once.

-- 
Andrew Burgess
[EMAIL PROTECTED]
Available for software contract work: www.scruz.net/~cichlid


------------------------------

From: Rolf Welde Skeie <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.setup
Subject: Re: SMP: Inconsistent variable MTRR settings ???
Date: Thu, 27 May 1999 14:41:03 +0200

You Wish wrote:
> I just installed RH 6.0 on a dual P2-266 system (QDI motherboard) and I get
> the following message when booting:
> 
> ...
> *IRQ mapping table*
> mtrr: your CPUs had inconsistent variable MTRR settings
> mtrr: probably your BIOS does not setup all CPUs
> PCI: PCI BIOS revision 2.10 entry at 0xfb530
> ...
> 
> Can someone give me more info. on this? Should I care at all?

Did you check the MPP level in the bios (should be 1.4).
Shooting from the hips, but could be related to this...
-- 
 Rolf Welde Skeie              Senior Design Engineer
_____________________________________________________________________
 Email : mailto:[EMAIL PROTECTED]   Scali AS (http://www.scali.com)
 Tlf   : (+47) 6384 6705       Hvamstubben 17                  oo
 Fax   : (+47) 6384 4005       2013 Skjetten      __________ m/V\> _
 Home  : (+47) 2214 8987       NORWAY               . . :: . 077-0
 Mob   : (+47) 9248 4511                      ----------------------

------------------------------

From: Warren Little <[EMAIL PROTECTED]>
Subject: Re: Initrd
Date: Thu, 27 May 1999 10:01:23 -0600

[EMAIL PROTECTED] wrote:

> Hi
>
> I have a few different Linux-partitions and are trying to boot one of them
> with a initrd.img (for having it read-only). The initrd.img contains a script
> linuxrc that shall mount the read-only filesystem as / in RAM. The linuxrc
> looks like this: "#!/bin/sh  mount -o ro /dev/hda4 /mnt  zcat
> /mnt/boot/ram40.img.gz > /dev/ram  umount /dev/hda4"
>
> sh, mount, zcat, umount are present in /bin in initrd.img.gz but when the
> linuxrc tries to run mount, zcat and umount something goes wrong.
>
> "/linuxrc : mount :not found
>  /linuxrc : zcat : not found
>  /linuxrc : umount : not found
>  ...
>  Kernel panic : Unable to mount root filesystem"
>
> total stop of course...
> I�ve also tried to write the full path in the linuxrc:
>
> "#!/bin/sh
>  /bin/mount -o ro /dev/hda4 /mnt
>  /bin/zcat /mnt/boot/initrd.img.gz > /dev/ram
>  /bin/umount /dev/hda4"
>
> This doesn�t help at all, it just says
>
> "/linuxrc : /bin/mount :not found
>  /linuxrc : /bin/zcat : not found
>  /linuxrc : /bin/umount : not found
>  ...
>  Kernel panic : Unable to mount root filesystem"
>
> You can see that the linuxrc-script is found but why can�t it find mount, zcat
> and umount? I can�t understand this!
>
> Anyone who have some hints?????
>
> Thank you
> Martin
>
> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own

  Martin,
                I am having the same problem.   I noticed that if I put an echo
in linuxrc it is executed fine,
                 but nothing in /bin appears to function.   I have placed several
binaries in /bin including pwd.
                At the end of linuxrc I execute sh before continuing on.  While
in the shell I can echo $PATH
                and it returns ":/bin:/usr/bin".  When I execute pwd I get back
"can't execute /bin/pwd", so it knows
                which directory pwd is in.  When I execute mount or /bin/mount it
returns "command not found".

                I'm running Redhat 6.0 (kernel 2.2.5 with all ramdisk/initrd
related stuff compiled in).
                I also noticed that if in lilo.conf I specify root=/dev/ram0
linuxrc doesn't appear to be executed
                but if I use root=/dev/ram it runs with the above problems.

                Can someone more fimiliar to the initrd process please explain
what is going on here.

           Thanks,
                   Warren


------------------------------

From: "Manohar Singh" <[EMAIL PROTECTED]>
Subject: C++ IDE ?
Date: Fri, 28 May 1999 00:48:16 +0530

hello there,
does anyone amongst u know of an IDE (C++) for Linux that i can download
from the net ?
thanks
manohar



------------------------------

From: "m.benndorf" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.networking,comp.os.linux.advocacy
Subject: Re: LINUX ability to handle large beowulf clusters
Date: Thu, 27 May 1999 18:47:21 +0200

Josef M=F6llers wrote:
> =

> There was a "Linux Cluster Event" run by a German TV station (WDR)
> during its "ComputerNacht" event last december. See
> http://www.uni-paderborn.de/cs/heiss/linux/cluster/artikel/cluster.html=

> (Sorry, but since the event is so long ago, there is little information=

> left, so all I could find was this German article)
> =


the official homepage for that is now:

http://www.linux-cluster.org/

but it's all in german



mike

------------------------------

From: "Hui-ung Kwon" <[EMAIL PROTECTED]>
Subject: Can I call system function directly ?
Date: Sat, 29 May 1999 02:54:54 +0900

Now I write daemon program.
System function call via system call increases overhead.
So I want to call system function( ex). sys_open, vfork) directly in my
application.
Can I call system function directly in my application for reducing overhead?










------------------------------

From: [EMAIL PROTECTED] (Arun Sharma)
Subject: Re: SMP needlessly migrating processes between processors?
Reply-To: [EMAIL PROTECTED]
Date: Thu, 27 May 1999 20:53:16 GMT

On Thu, 27 May 1999 01:22:42 GMT, bryan <[EMAIL PROTECTED]> wrote:
> Arun Sharma <[EMAIL PROTECTED]> wrote:
> : On Wed, 26 May 1999 04:46:26 GMT, Skip Montanaro <[EMAIL PROTECTED]> wrote:
> : > I recently started running RH 5.2 on a dual P-II box (Tyan Thunderbolt
> : > motherboard). I'm running kernel 2.2.9.  When I run a single
> : > CPU-intensive process and launch xosview to watch things, I see a
> : > pattern of CPU load that suggests to me that the single busy process is
> : > migrating back and forth between the processors roughly every half
> : > second or so. I see a little square wave pattern for the user time
> : > portion of the two CPU's graphs.  The patterns for the two processors
> : > are roughly 180 degrees out of phase with one another.  It seems to me
> : > that the scheduler isn't weighting things heavily enough to keep
> : > processes from migrating too much. Is this normal?  Isn't there a cache
> : > flush overhead when migrating processes between processors? 
> : > 
> 
> : You can increase PROC_CHANGE_PENALTY in include/asm/smp.h to prevent
> : the migration.
> 
> I tried that once and had bad results.  but I admit I don't know the
> true effects of incr or decr this value.  are there guidelines?  what
> does x% increase do vs y% incr?  etc, etc.
> 

Too hard to express in words - you'll have to read the source. The best
I can do is: if you increase the above number by X, the effect would be 
the same as, had the process used X ticks less of its allocated time slice.
Remember, the scheduler tries to favor processes that use less CPU than
what is allocated to them. 

But if your goal is to bind a process to a particular processor, you
should use one of the processor binding patches floating around.

        -Arun


------------------------------


** FOR YOUR REFERENCE **

The service address, to which questions about the list itself and requests
to be added to or deleted from it should be directed, is:

    Internet: [EMAIL PROTECTED]

You can send mail to the entire list (and comp.os.linux.development.system) via:

    Internet: [EMAIL PROTECTED]

Linux may be obtained via one of these FTP sites:
    ftp.funet.fi                                pub/Linux
    tsx-11.mit.edu                              pub/linux
    sunsite.unc.edu                             pub/Linux

End of Linux-Development-System Digest
******************************

Reply via email to