Linux-Development-Sys Digest #745, Volume #8 Thu, 24 May 01 06:13:06 EDT
Contents:
Re: Trouble using large amount of memory with Redhat 7 (Nix)
Re: Newbie programmer (Kaz Kylheku)
Re: Newbie programmer (Victor Wagner)
Re: Trouble using large amount of memory with Redhat 7 ("J. P. Montgomery")
Re: Newbie question about Linux Devie Driver Application ("nickwang")
Re: Newbie question about Linux Devie Driver Application ("nickwang")
Kernel Stack on Usb (Debian User)
Re: SIGSEGV is not blocking (Steve Watt)
Re: Nonblocking wait() ("morpheus")
process monitoring ("������")
Re: dd reminder ("Cameron Kerr")
Re: Nonblocking wait() ("Cameron Kerr")
Re: thundering-herd vs wake-one ("Cameron Kerr")
----------------------------------------------------------------------------
From: Nix <$}xinix{[email protected]>
Subject: Re: Trouble using large amount of memory with Redhat 7
Date: 24 May 2001 00:20:37 +0100
On Tue, 22 May 2001, J. P. Montgomery yowled:
> Incidently, I use Portland compilers ... I have only mentioned g77 as a way
> of comparing results. The Portland guy I exchanged email said that g77
> imposes a hard limit on size ...
This is pure nonsense. Some versions of G77 (and GCC in general) have
had problems that cause massive consumption of memory in some situations
(such as initializing huge arrays in the source code in C, as is done in
XPM files) but there is no hard limit. (Why would there be? What would
be the point of imposing one?)q
> but I still find this hard to believe since
> I know a lot of people regularly use gcc and g77.
You're right. There is no hard limit on memory use.
> I understand about swap and ram ... I do not understand the actual limits in
What does `ulimit -a' say? It sounds to me like you have a limit on data
space consumption of 512Mb... which implies that the Portland compiler
is explicitly *removing* those limits, a distinctly unfriendly act in my
opinion.
> the kernel and how to find them. When I use a simple C code to retrieve the
> resource limits (rlimit) I get 4G for the process size (ram+swap). However,
You want the data size, not the process size.
Have you tried using a released version of GCC, as well as the
unreleased thing that comes with RH7?
--
`LARTing lusers is supposed to be satisfying. This is just tedious. The
silly shite I'm doing now is like trying to toothpick to death a Black
Knight made of jelly.' --- RDD
------------------------------
From: [EMAIL PROTECTED] (Kaz Kylheku)
Crossposted-To: alt.os.linux.mandrake,comp.os.linux.development.apps
Subject: Re: Newbie programmer
Reply-To: [EMAIL PROTECTED]
Date: Wed, 23 May 2001 23:57:32 GMT
On Tue, 22 May 2001 11:21:40 +0000, Kasper Dupont <[EMAIL PROTECTED]> wrote:
>Nix wrote:
>>
>> [Followup-To: overridden, I do not take that group]
>>
>> On Wed, 16 May 2001, Thorsten Roggendorf said:
>> > xemacs is a frontend for emacs
>>
>> I don't know *where* you got that from.
>>
>> XEmacs is a fork of GNU Emacs, not a frontend of any kind; there are
>> substantial differences between them, but more similarities than
>> differences. Which to use is a religious matter. :)
>>
>
>I have always wondered about that X in XEmacs.
>I mean Emacs does run under X, so why make a
>new version and call that XEmacs?
The fork took place quite a long time ago, so the naming is likely
a reflection of the circumstances then, rather than now!
------------------------------
From: [EMAIL PROTECTED] (Victor Wagner)
Crossposted-To: alt.os.linux.mandrake,comp.os.linux.development.apps
Subject: Re: Newbie programmer
Date: 23 May 2001 09:18:30 +0400
Kasper Dupont <[EMAIL PROTECTED]> wrote:
: I have always wondered about that X in XEmacs.
: I mean Emacs does run under X, so why make a
: new version and call that XEmacs?
X is short for eXtended in this case.
--
* JHM wonders what Joey did to earn "I'd just like to say, for the record,
that Joey rules."
-- Seen on #Debian
------------------------------
From: "J. P. Montgomery" <[EMAIL PROTECTED]>
Subject: Re: Trouble using large amount of memory with Redhat 7
Date: Wed, 23 May 2001 22:58:33 -0500
I will most likely upgrade to 2.2.19 or recompile the kernel. When looking
at present kernel directory and my config files, I note that the stock
kernels in Redhat 7.0 are compiled with 1G and no BIGMEM. I would assume
that I need to turn on 2G ... but am unsure of BIGMEM. Also the parameters
or patches to make for jobs bigger than 2G (i.e. with 1.5G of ram, I would
like to be able to use 1.5 G of the swap occasionally for a job size of 3G).
Any pointers to documentation.
Also, I note that there are a 'lot' of kernels now adays ... 386, 586, 686,
etc. I assume that these have slightly different options turned on. I
assume that with an AMD K7 I really want to use the 686 ... or is there a
kernel more tuned to the K7 ... or is this all configurable when compiling
the kernel (I haven't done this is a few years ... hence the questions).
Also when looking at the vmlinux site I note that they talk about somebodies
patch that they routinely apply to get big process size, etc.
I'll email the strace tomorrow at work.
Thanks again.
"Karl Heyes" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> In article <9efbji$kd9$[EMAIL PROTECTED]>, "J. P. Montgomery"
> <[EMAIL PROTECTED]> wrote:
>
>
> > Thanks for the added information ... I did run strace and appear to be
using
> > the latest libraries ... I'll bring the files home tomorrow and send
them if
> > necessary. Incidently, although I have used mem= in lilo but have not
> > included it presently. I'll try this tomorrow. Is there anything in
the
> > strace output you were looking for other than the libraries? I noticed
that
> > it was outputting bk() values that I have seen in memory discussions ...
> > Incidently, I use Portland compilers ... I have only mentioned g77 as a
way
> > of comparing results. The Portland guy I exchanged email said that g77
> > imposes a hard limit on size ... but I still find this hard to believe
since
> > I know a lot of people regularly use gcc and g77.
>
> brk is the actual call used by the libraries to allocate more space from
the
> process VM. Does g77 require many libraries, not knowing g77 means I'm
not
> sure of it's memory usage.
>
> > Portland is licensed
> > software ... but allows a home use license and so both compilers are
> > identical versions running the same kernel (except the SMP kernel is
used at
> > home on the dual processor machine).
> > I understand about swap and ram ... I do not understand the actual
limits in
> > the kernel and how to find them. When I use a simple C code to retrieve
the
> > resource limits (rlimit) I get 4G for the process size (ram+swap).
However,
> > I had not run this on the big machine with the SMP kernel. I would have
> > thought that this would have retrieved the values that the kernel
> > recognizes.
>
> 2 Gig is the default for a user process, but that gets used for program,
> libraries and it's data, so it depends on the program and how efficient
the
> libraries are at allocating memory.
>
> > I was wondering what you think about just upgrading my distribution to
> > Redhat 7.1 and the 2.4.? kernel ... ? Of course, I do have a never give
up
> > philosophy ...
>
> or upgrade your kernel to 2.2.19. I still think the problem is
application
> related. mail me the strace output, I'll have a quick look.
>
> karl.
------------------------------
From: "nickwang" <[EMAIL PROTECTED]>
Subject: Re: Newbie question about Linux Devie Driver Application
Date: Thu, 24 May 2001 10:55:24 +0800
yes,it's the single quotes and double quotes problem.
thank you.
"Kasper Dupont" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> nickwang wrote:
> >
> > HI,all
> > I've got some questions about Linux application like below:
> > I wrote a application to use the ioctl(int fd,int cmd) function.
> > The "fd" parameter is the file handler. I'm not sure about the "cmd"
> > parameter.
> > I just "#define LCD_HD44780_CLEAR _IO("I",0X11)",and then use the
> > "LCD_HD44780_CLEAR"
> > as "cmd", but error show like this "lcd.c:41 invalid operands to binary
<<"
> > line 41 is where the "ioctl(int fd,LCD_HD44780_CLEAR)"is.
> > What is the problem?
> > Thank you!
>
> There is a difference between single and double
> quotes. You have to write:
> #define LCD_HD44780_CLEAR _IO('I',0X11)
>
> --
> Kasper Dupont
------------------------------
From: "nickwang" <[EMAIL PROTECTED]>
Subject: Re: Newbie question about Linux Devie Driver Application
Date: Thu, 24 May 2001 10:58:39 +0800
HI,ALL:
>From the man page I can see that ioctl return -1 when account error,and
there are also some "errno" like "EBADF","EFAULT"... Do you know how can I
get these? You know, I want to see where the problem is.
Thanks again!!
------------------------------
From: Debian User <[EMAIL PROTECTED]>
Subject: Kernel Stack on Usb
Date: Wed, 23 May 2001 20:39:40 -0700
This is a multi-part message in MIME format.
==============FE9D635162AE3A5DE7D92E04
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
I received this on kernel 2.2.19
However my mouse and keyboard worked, both usb. It only happened once. I
rebooted and haven't seen it happen yet.
--
/Jason G Helfman
"At any given moment, you may find the ticket to the circus that has
always
been in your possession."
Fingerprint: 6A32 3774 E390 33B5 8C96 2AA1 2BF4 BD71 35A1 C149
GnuPG http://www.gnupg.org Get Private! 1024D/35A1C149
==============FE9D635162AE3A5DE7D92E04
Content-Type: text/plain; charset=us-ascii;
name="stackerr.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="stackerr.txt"
usb.c: registered new driver hid
mice: PS/2 mouse device common for all mice
usb.c: registered new driver usbdevfs
usb.c: registered new driver hub
usb-uhci.c: $Revision: 1.237 $ time 18:07:44 May 23 2001
usb-uhci.c: High bandwidth mode enabled
PCI: Increasing latency timer of device 00:fa to 64
usb-uhci.c: USB UHCI at I/O 0xef80, IRQ 3
usb-uhci.c: Detected 2 ports
usb.c: new USB bus registered, assigned bus number 1
usb.c: USB new device connect, assigned device number 1
usb.c: kmalloc IF c7e27080, numif 1
usb.c: new device strings: Mfr=0, Product=2, SerialNumber=1
usb.c: USB device number 1 default language ID 0x0
Product: USB UHCI Root Hub
SerialNumber: ef80
hub.c: USB hub found
hub.c: 2 ports detected
hub.c: ganged power switching
hub.c: standalone hub
hub.c: global over-current protection
hub.c: power on to power good time: 2ms
hub.c: hub controller current requirement: 0mA
hub.c: port 1 is removable
hub.c: port 2 is removable
hub.c: local power source is good
hub.c: no over-current condition exists
hub.c: enabling power on all ports
usb.c: hub driver claimed interface c7e27080
VFS: Mounted root (ext2 filesystem) readonly.
Freeing unused kernel memory: 48k freed
Adding Swap: 2064344k swap-space (priority -1)
eth0: Initial media type Autonegotiate.
eth0: MII #24 status 786d, link partner capability 0080, setting half-duplex.
eth0: Initial media type Autonegotiate.
eth0: MII #24 status 786d, link partner capability 0080, setting half-duplex.
VFS: Disk change detected on device ide1(22,0)
ISO 9660 Extensions: RRIP_1991A
hub.c: port 1 connection change
hub.c: portstatus 301, change 1, 1.5 Mb/s
hub.c: portstatus 303, change 0, 1.5 Mb/s
usb.c: USB new device connect, assigned device number 2
usb.c: kmalloc IF c5fd4b00, numif 2
usb.c: skipped 1 class/vendor specific interface descriptors
usb.c: skipped 1 class/vendor specific interface descriptors
usb.c: new device strings: Mfr=1, Product=2, SerialNumber=0
usb.c: USB device number 2 default language ID 0x409
Manufacturer: Logitech
Product: USB Receiver
keybdev.c: Adding keyboard: input0
input0: USB HID v1.10 Keyboard [Logitech USB Receiver] on usb1:2.0
usb.c: hid driver claimed interface c5fd4b00
keybdev.c: Adding keyboard: input1
input1: USB HID v1.10 Device [Logitech USB Receiver] on usb1:2.1
usb.c: hid driver claimed interface c5fd4b18
hub.c: port 2 connection change
hub.c: portstatus 301, change 1, 1.5 Mb/s
hub.c: portstatus 303, change 0, 1.5 Mb/s
usb.c: USB new device connect, assigned device number 3
usb.c: kmalloc IF c717d980, numif 1
usb.c: skipped 1 class/vendor specific interface descriptors
usb.c: new device strings: Mfr=1, Product=2, SerialNumber=0
usb.c: USB device number 3 default language ID 0x409
Manufacturer: Logitech
Product: USB Receiver
mouse0: PS/2 mouse device for input2
input2: USB HID v1.10 Mouse [Logitech USB Receiver] on usb1:3.0
usb.c: hid driver claimed interface c717d980
hub.c: port 2 connection change
hub.c: portstatus 100, change 3, 12 Mb/s
usb.c: USB disconnect on device 3
hub.c: port 2 enable change, status 100
hub.c: port 2 connection change
hub.c: portstatus 301, change 1, 1.5 Mb/s
hub.c: portstatus 303, change 0, 1.5 Mb/s
usb.c: USB new device connect, assigned device number 3
usb.c: kmalloc IF c6d2a3a0, numif 1
usb.c: skipped 1 class/vendor specific interface descriptors
usb.c: new device strings: Mfr=1, Product=2, SerialNumber=0
usb.c: USB device number 3 default language ID 0x409
Manufacturer: Logitech
Product: USB Receiver
mouse0: PS/2 mouse device for input2
input2: USB HID v1.10 Mouse [Logitech USB Receiver] on usb1:3.0
usb.c: hid driver claimed interface c6d2a3a0
keyboard: Timeout - AT keyboard not present?
keyboard: Timeout - AT keyboard not present?
kmem_free: Bad obj addr (objp=c60fb0e0, name=urb_priv)
Unable to handle kernel NULL pointer dereference at virtual address 00000000
current->tss.cr3 = 00101000, %cr3 = 00101000
*pde = 00000000
Oops: 0002
CPU: 0
EIP: 0010:[<c011dfdc>]
EFLAGS: 00010282
eax: 0000003a ebx: c60fb0e0 ecx: 00000003 edx: 00000038
esi: c7fffaa0 edi: 00000282 ebp: c7fecda0 esp: c32e7d9c
ds: 0018 es: 0018 ss: 0018
Process gpm (pid: 975, process nr: 32, stackpage=c32e7000)
Stack: c5694c40 c7fecda0 00000002 c60fb0e0 c5694c40 c01dd33f c7fecda0 00000000
00000000 c01dd441 c7fffaa0 c60fb0e0 c7fecda0 c01dd3bf c5fd4994 c5fd4994
c5fd4920 00000001 c74f5260 c790dc00 0003d808 c01dd714 c7fecda0 c5694c40
Call Trace: [<c01dd33f>] [<c01dd441>] [<c01dd3bf>] [<c01dd714>] [<c013a48a>]
[<c012ef75>] [<c01d17b0>]
[<c01d7f9c>] [<c01d0808>] [<c013b6e1>] [<c01dafd1>] [<c0117888>] [<c0122255>]
[<c01198d1>] [<c0123398>]
[<c012338f>] [<c011f5f3>] [<c01183be>] [<c0111323>] [<c01222e3>] [<c01112c0>]
[<c0114860>] [<c01147e9>]
[<c010d208>] [<c01149d5>] [<c0107b85>] [<c0107a6c>]
Code: c7 05 00 00 00 00 00 00 00 00 eb 12 83 c4 fc 56 53 68 5e 58
==============FE9D635162AE3A5DE7D92E04==
------------------------------
Crossposted-To: comp.os.linux.development.apps,comp.programming.threads
From: [EMAIL PROTECTED] (Steve Watt)
Subject: Re: SIGSEGV is not blocking
Date: Thu, 24 May 2001 06:09:11 GMT
In article <9e2930$nk4$[EMAIL PROTECTED]>,
Victor Wagner <[EMAIL PROTECTED]> wrote:
>Linus Torvalds <[EMAIL PROTECTED]> wrote:
>
>:>What bothers me is that SIGSEGV was blocked, and yet still
>:>delivered, and I want to know why.
>
>: Because the kernel had two choices: deliver it despite the programmer
>: telling it not to, or killing the process outright because the process
>: is no longer doing anything useful.
>
>: Now, you might say that killing is better. I might agree. We can vote on
>: it, I don't personally particularly care one way or the other. But you
>: only get those two choices: kill the dang thing outright, or just ignore
>: the blocking. We just don't have any other good choices.
>
>From the kernel point of view - definitely.
>From the application point of view there is possibility to deal with
>SIGSEGV - non-local exit. I.e. application should define exception
>handler somewhere, which knows what to do if particular routine fails
>with SIGSEGV, and provide signal handler which would transfer control
>there.
But what was being talked about is _blocking_ or _ignoring_ SIGSEGV; not
handling it. If you handle SEGV with a handler that does nothing, I
suspect most systems will then spin that thread forever, executing
the faulting instruction, trapping, setting up and executing the signal
handler, etc.
Handling SEGV in a truly POSIX environment is ... challenging,
since you can't do a whole lot from a signal handler, but that's a
different can of worms.
--
Steve Watt KD6GGD PP-ASEL-IA ICBM: 121W 56' 57.8" / 37N 20' 14.9"
Internet: steve @ Watt.COM Whois: SW32
Free time? There's no such thing. It just comes in varying prices...
------------------------------
From: "morpheus" <[EMAIL PROTECTED]>
Subject: Re: Nonblocking wait()
Date: Thu, 24 May 2001 07:39:43 GMT
Yeah, i know that this won't compile, it was just a pseudo-code
sample.
But waitpid() is nonblocking, is it? If I do a waitpid(pid_t,
status, options) then the child would return to the father before
having finished, wouldn't it? And what are this strange options?
Wich one should I use?
Thanks.
------------------------------
From: "������" <[EMAIL PROTECTED]>
Subject: process monitoring
Date: Thu, 24 May 2001 17:33:21 +0900
I want to develop program that is monitoring process at linux platform..
I know that I have to use /proc filesystem.
I want to get sample code
I use C language..
Please...
------------------------------
From: "Cameron Kerr" <[EMAIL PROTECTED]>
Subject: Re: dd reminder
Date: Thu, 24 May 2001 21:42:54 +1200
In article <[EMAIL PROTECTED]>, "Johan Kullstam"
<[EMAIL PROTECTED]> wrote:
> "Brad Hubbard" <[EMAIL PROTECTED]> writes:
>
>> Can someone confirm this is appropriate to copy one partition to
>> another?
>>
>> dd if=/dev/hda1 of=/dev/md1 bs=1
>
> i usually put down a fresh filesystem on the new partition and then use
> "cp -ax".
>
Yes, if you're copying data to a RAID array, there is no point using dd.
Use either copy to tar. Much faster (and smaller).
--
Cameron Kerr -- cameron.kerr @ paradise.net.nz
Praise Slackware, our baud and saviour!
--
------------------------------
From: "Cameron Kerr" <[EMAIL PROTECTED]>
Subject: Re: Nonblocking wait()
Date: Thu, 24 May 2001 21:46:48 +1200
> what parameters in waitpid? Man is not so clear about it! Thanks in
> advance for any help!
> Ale
You'll want to use the W_NO_HANG option to clean up the
process after it has finished (otherwise you'll have a
whole lot of zombie processes, which are just process
table entries that are waiting to be looked at. This
option tells the kernel we don't care about their
return code.
--
Cameron Kerr -- cameron.kerr @ paradise.net.nz
Praise Slackware, our baud and saviour!
--
------------------------------
From: "Cameron Kerr" <[EMAIL PROTECTED]>
Subject: Re: thundering-herd vs wake-one
Crossposted-To: comp.unix.bsd.freebsd.misc
Date: Thu, 24 May 2001 21:51:43 +1200
In article <[EMAIL PROTECTED]>, "Unknown"
<[EMAIL PROTECTED]> wrote:
> Note: This is crossposted on FreeBSD and Linux because I'm asking this
> question in the context of both of these systems.
>
> Linux recently added "wake-one" capability in version 2.4 (patches exist
> for 2.2), and from what I read so far, FreeBSD has had this well before
Is this related to "wake on LAN"? If so, you should check out
www.scyld.com. If not, what's wake-one?
[snip]
--
Cameron Kerr -- cameron.kerr @ paradise.net.nz
Praise Slackware, our baud and saviour!
--
------------------------------
** 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 by posting to the
comp.os.linux.development.system newsgroup.
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
******************************