Linux-Development-Sys Digest #606, Volume #8 Tue, 3 Apr 01 16:13:10 EDT
Contents:
Re: mysql or postgresql? which is better? (Moritz Franosch)
Re: Using DMA hardware from user space (David Florez)
Signal, Kernel and Co (Mikael Chambon)
pthread - threads and semaphores - help! ("Ivor Cox")
Re: mysql or postgresql? which is better? ("Andy Jeffries")
Re: 2.4.3 compile errors? (Young4ert)
Re: How to handle newline character(s) in a TCP server (David Schwartz)
LILO version 21.7.3 released (John in SD)
Re: RFC 868 inconsistency? (Dave Perks)
Re: RFC 868 inconsistency? (Chris J/#6)
TCP/IP socket buffering ("hebre")
Re: TCP/IP socket buffering (Lew Pitcher)
Re: TCP/IP socket buffering (Grant Edwards)
Re: The roadblocks to printing are infinitely numbered (Phil Ehrens)
Re: did anyone have problems with Daylight Savings changeover? (H�kon Alstadheim)
Equivalent function to IRIX hinv? ("Carden, C. (Chris)")
----------------------------------------------------------------------------
From: Moritz Franosch <[EMAIL PROTECTED]>
Subject: Re: mysql or postgresql? which is better?
Date: 03 Apr 2001 10:57:46 +0200
"Hans-Peter Maurer" <[EMAIL PROTECTED]> writes:
> which is better mysql or postgresql? Which is more reliable and more
> powerful...?
Note that MySQL does not fully implement SQL standards, see
http://www.mysql.com/documentation/mysql/bychapter/manual_Compatibility.html#Compatibility
I don't know about Postgresql.
MySQL also had some security issues in the near past.
Moritz
------------------------------
From: David Florez <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: Re: Using DMA hardware from user space
Date: Tue, 03 Apr 2001 10:48:31 +0200
Thanks a lot to all of you for your valuable responses.
I have a clearer vision of the problem now.
Thanks again.
Grant Edwards wrote:
>
> In article <O_6x6.49$[EMAIL PROTECTED]>, Ken Whaley wrote:
>
> >> - Your application should _not_ program the ASIC itsef. It should
> >> call your driver telling it what DMA transfer has to be done.
> >> The driver gets (by virt_to_bus()) the bus address of the buffer
> >> and can program the ASIC.
> >
> >Not necessarily so. User-level drivers can be just fine,
> >especially if you need no kernel support beyond that of
> >allocating and mapping the DMA region, and mapping the device
> >resources (registers/memory/etc) to user-space. It's
> >especially easy if the DMA region is physically contiguous,
> >since calculating physical and bus addresses from the virtual
> >address is trivial on most platforms. If your target system is
> >a "mainstream" one (e.g., that can memory map PCI devices
> >"sanely"), and you need no kernel support beyond those few
> >things mentioned above, and your driver is for your use as
> >opposed to for general public consumption, then go right ahead
> >and write the driver in user-space.
>
> I agree wholeheartedly with Ken. Debugging in user-space is
> *so* much easier. Do everything you can in user-space at first
> -- especially if you're doing something like testing prototype
> hardware. Debugging a new ASIC design is bad enough without
> having to do it using kernel code.
>
> One thing that's extremely handy during deubgging is to have a
> /proc entry point that dumps out a snapshot of whatever state
> information you can suck out of the thing.
>
> Once you've got the hardware debugged, and figured out exactly
> what you want and how to do it[*], _then_ you can move the
> needed functionaly into a kernel module and put a nice wrapper
> around it for general consumption.
>
> [*] IOW, you've got usable work-arounds for the things in the
> ASIC that don't work. ;)
>
> --
> Grant Edwards grante Yow! Uh-oh!! I forgot
> at to submit to COMPULSORY
> visi.com URINALYSIS!
------------------------------
From: Mikael Chambon <[EMAIL PROTECTED]>
Subject: Signal, Kernel and Co
Date: Tue, 03 Apr 2001 11:36:17 +0200
Hi,
I am trying to understand how a signal can received by a process.
I think I've mostly understood everything about the sending
step, but after send_sig_info() did a sigaddset and put
p->sigpending = 1 (p is a pointer to the target task_struct)
how the kernel now that a signal has arrived on the target process ?
What is the link with the ret_from_intr() and do_signal functions ??
Thanks if you can help me.
--
Mikael Chambon | Paris France | ICQ 10249913
------------------------------
From: "Ivor Cox" <[EMAIL PROTECTED]>
Subject: pthread - threads and semaphores - help!
Date: Tue, 3 Apr 2001 12:37:21 +0100
Hi,
I am porting a multi-thread application to linux. The app is stable and
gives no nasties under windows and also QNX-neutrino.
I am using Red Hat purchased in December.
I am in the first stages of compilation and have some problems:
1. I am not sure if I need special compile flags for multi-thread
(reentrant)
2. the app compiles but either crashes with seg violation with no set stack
size for the threads, or the thread start is failed (1) if I set a stack
size. (app running at normal user level - not root)
3. I need a recursive semaphore and 'man' documentation seems to support
this. However the compile will not work as the recursive bits of the header
are conditional on __USE_GNU. I can't set this, it seems, unless I copy the
header and edit it (as an experiment - this can't be expected to be right.)
Can anyone advise me - I am a linux newbie - on the basics for threads in
linux. I understand threads in principle and have a working app for
win/neutrino - I need to know the basics for linux re recursive semahores
and compiler options etc for multi-thread.
(I do read the documentation, but it does not always stack!)
Cheers
Ivor Cox
------------------------------
From: "Andy Jeffries" <[EMAIL PROTECTED]>
Subject: Re: mysql or postgresql? which is better?
Date: Tue, 03 Apr 2001 14:00:54 +0100
> "Hans-Peter Maurer" <[EMAIL PROTECTED]> writes:
>> which is better mysql or postgresql? Which is more reliable and more
>> powerful...?
>
> Note that MySQL does not fully implement SQL standards, see
>
>
>http://www.mysql.com/documentation/mysql/bychapter/manual_Compatibility.html#Compatibility
>
> I don't know about Postgresql.
Which SQL standards are you referring to. Microsoft SQL Server, MySQL,
PostgreSQL and Oracle all missing parts of SQL99 (SQL3) compliance
(variations from the specification).
Anyway, just to put in my 2p-worth, I have been using MySQL for about 2
years in a web-consultancy/design environment and am now moving to
PostgreSQL for all future sites. The reason: simple, PostgreSQL has a
much higher amount of features (transactions, sub-selects,
user-functions (not written as .so's), triggers) and an equivalent speed.
Cheers,
--
Andy Jeffries
Lead-developer of Scramdisk for Linux
Developer of original Scramdisk Delphi Component
------------------------------
From: Young4ert <[EMAIL PROTECTED]>
Subject: Re: 2.4.3 compile errors?
Date: Tue, 03 Apr 2001 13:07:02 GMT
Harmon Seaver wrote:
> Trying to comile kernel 2.4.3 on Redhat 7.0 on a Cyrix 200, Asus TX97E
> motherboard, I got a segfault. When I went to report it on bugzilla, I
> noticed someone else getting a segfault with 2.4.0, and the answer was to
> use kgcc. So, I changed the Makefile to use kgcc instead of gcc, then I
> got "kgcc: Internal compiler error: program cc1 got fatal signal 11, then
> a bunch more stuff like
> [rsrc_mgr.o] Error 1, [first_rule] Error 2, [subdir_pcmcia] Error 2,
> [dir_drivers] Error 2, and then an Assembler meesage about end of file
> [not at
> end of line, etc.
> I don't see any other posts of problems with 2.4.3, here or on
> bugzilla. I
> didn't have much problem compiling 2.4.1 or 2.4.2.
>
>
My system is composed of an Asus K7M mobo + an Athlon AMD 500MHz CPU and
have been used to compile linux kernel with no problem, including the
latest linux-2.4.3 kernel. The only problem I encountered in compiling
linux-2.4.3 is the "Include support for Iomega Buz" as a module (the
particular file is drivers/media/video/buz.c) in which the compiler
complains that it can't find KMALLOC_MAXSIZE.
------------------------------
From: David Schwartz <[EMAIL PROTECTED]>
Crossposted-To: comp.unix.programmer,comp.os.linux.development.apps
Subject: Re: How to handle newline character(s) in a TCP server
Date: Mon, 02 Apr 2001 12:02:17 -0700
Kasper Dupont wrote:
> This is exactly the reasons why I don't think you should
> use two character line breaks in new protocols.
>
> TCP is a binary stream protocol, you are free to implement
> whatever text stream you want on top of that. Two char
> line breaks should only be used if you need to be
> compatible with existing software.
>
> The two char line breaks are not used everywhere on the
> internet. When I fetch a page from my webserver it sends
> only 10 as line break.
The relevant standard says, "HTTP/1.1 defines the sequence CR LF as the
end-of-line marker for all protocol elements except the entity-body (see
appendix 19.3 for tolerant applications). The end-of-line marker within
an entity-body is defined by its associated media type, as described in
section 3.7." So you MUST use a CRLF every place the standard mandates
an end-of-line sequence, such as after each header and between the
header and the enetity-body.
DS
------------------------------
From: John in SD <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.hardware,comp.os.linux.misc
Subject: LILO version 21.7.3 released
Reply-To: [EMAIL PROTECTED]
Date: Tue, 03 Apr 2001 14:27:15 GMT
LILO release 21.7.3 is based upon Werner Almesberger's LILO version 21.
Version 21.7.3 is a bugfix release.
Version 21.7 adds support for higher serial line rates.
Version 21.6 is an upgrade for users of the Reiser File System, and adds
new diagnostic capabilities. Internal changes allow booting kernels with
larger real-mode setup codes (2.4.0 and later).
Source code is available for download from:
ftp://brun.dyndns.org/pub/linux/lilo (developer's site)
Or from the main distribution site:
ftp://metalab.unc.edu/pub/Linux/system/boot/lilo (please use)
See the distribution file 'CHANGES' for details of the differences between
21.7.3 and prior releases.
--John Coffman <[EMAIL PROTECTED]>
LILO version 21.7 (24-Feb-2001) source at
http://www.ibiblio.org/pub/Linux/system/boot/lilo
patches to -2 at ftp://brun.dyndns.org/pub/linux/lilo
------------------------------
From: Dave Perks <[EMAIL PROTECTED]>
Subject: Re: RFC 868 inconsistency?
Date: Tue, 03 Apr 2001 15:03:06 GMT
Luben Tuikov wrote:
> RFC 868 describes the time protocol TCP/UDP port 37 service,
> which it says returns the number of seconds since 0:0 Jan 1, 1900 GMT
> as a signed 32 bit binary number.
> My questions are: is the format big-endian or little-endian?
Probably big-endian since that is the TCP/IP "network byte order."
> Also the example in the RFC says that 2,208,988,800 corresponds
> to 0:0 Jan 1, 1970 GMT, but how is this possible as this number is
> greater than a 32 bit LONG_MAX (which is 2,147,483,647)?
>
> Either the RFC means 1970 rather than 1900 or the number returned is NOT
> a 32 bit signed number?
2^32 seconds is approximately 136 years. The RFC says the 32 bit number
is good until 2036. Hence the number is unsigned, and the last example
with a negative value would not be valid. So don't use this protocol in
the 19th century :-)
------------------------------
From: [EMAIL PROTECTED] (Chris J/#6)
Subject: Re: RFC 868 inconsistency?
Reply-To: [EMAIL PROTECTED]
Date: 3 Apr 2001 19:16:10 +0100
In article <[EMAIL PROTECTED]>,
Luben Tuikov <[EMAIL PROTECTED]> wrote:
>Hello,
>
>RFC 868 describes the time protocol TCP/UDP port 37 service,
>which it says returns the number of seconds since 0:0 Jan 1, 1900 GMT
>as a signed 32 bit binary number.
>My questions are: is the format big-endian or little-endian?
>
It's in network-byte-order, which I believe is big-endian. The RFC doesn't
say it's a signed 32-bit number, only that its a 32-bit number (scanning
it quickly here).
>Also the example in the RFC says that 2,208,988,800 corresponds
>to 0:0 Jan 1, 1970 GMT, but how is this possible as this number is
>greater than a 32 bit LONG_MAX (which is 2,147,483,647)?
>
>Either the RFC means 1970 rather than 1900 or the number returned is NOT
>a 32 bit signed number?
>
See above - the RFC doesn't stipulate the sign of the number, therefore
by deduction, the number is unsigned.
Chris...
--
Chris Johnson \ "If not for me then, do it for yourself. If not
[EMAIL PROTECTED] \ for then do it for the world." -- Stevie Nicks
www.nccnet.co.uk/~sixie/ ~---------------------------------------+
Redclaw chat - http://redclaw.org.uk - telnet redclaw.org.uk 2000 \______
------------------------------
From: "hebre" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.networking
Subject: TCP/IP socket buffering
Date: Tue, 3 Apr 2001 22:18:57 +0400
Hi!
Does anybody know how to disable receive buffering?
Problem:
When client sends sequense of packets to server and server starts to
receive them after some timeout (when all packets have been sent) it gets
all packets in one recv() call, and buffer contains these in concatenated
state. I have no information about this packets' format and can't to
separate them, but I have to do it.
Client: Server:
send (sock,Packet1..) do something (not recv())
send (sock,Packet2..) ...........
send (sock,Packet1..) ...........
recv(buff,....)
buff = Packet1Packet2Packet3
Help, please!
------------------------------
From: [EMAIL PROTECTED] (Lew Pitcher)
Crossposted-To: comp.os.linux.networking
Subject: Re: TCP/IP socket buffering
Reply-To: [EMAIL PROTECTED]
Date: Tue, 03 Apr 2001 18:34:57 GMT
On Tue, 3 Apr 2001 22:18:57 +0400, "hebre" <[EMAIL PROTECTED]>
wrote:
>Hi!
>Does anybody know how to disable receive buffering?
>
>Problem:
> When client sends sequense of packets to server and server starts to
>receive them after some timeout (when all packets have been sent) it gets
>all packets in one recv() call, and buffer contains these in concatenated
>state. I have no information about this packets' format and can't to
>separate them, but I have to do it.
>
>Client: Server:
>
>send (sock,Packet1..) do something (not recv())
>send (sock,Packet2..) ...........
>send (sock,Packet1..) ...........
>
>recv(buff,....)
>
>buff = Packet1Packet2Packet3
Please correct me if I am wrong, but it appears that you are using TCP
sockets. If so, then there's nothing you can do but ensure that each
packet contains some sort of delimiter that the receiver will
recognize as an 'end-of-packet' signal. You see, TCP is a byte-stream
protocol, and doesn't recognize data constructs of any size other than
8bit octets. It's up to the sending and receiving applications to
agree on some standard message format or structure in order to manage
data larger than a byte.
Lew Pitcher, Information Technology Consultant, Toronto Dominion Bank Financial Group
([EMAIL PROTECTED])
(Opinions expressed are my own, not my employer's.)
------------------------------
From: [EMAIL PROTECTED] (Grant Edwards)
Crossposted-To: comp.os.linux.networking
Subject: Re: TCP/IP socket buffering
Date: Tue, 03 Apr 2001 19:06:46 GMT
In article <[EMAIL PROTECTED]>, Lew Pitcher wrote:
>>Does anybody know how to disable receive buffering?
[using TCP for datagrams]
Bummer. I'm stuck supporting legacy products that use TCP as a
datagram service. Programs that use TCP as a datagram service
are just plain broken. But when they're already fielded, I
guess you've got no choice but try to support them.
There are two things you can do:
First, find whoever designed a datagram protocol on top of TCP
and bitch-slap him into next week. The program still won't
work right, but you'll feel better.
Second, there are socket options you can set to control the
size of recieve and transmit buffers. See socket(7) and look
for SO_RCVBUF and SO_SNDBUF. Changing them may or may not
help, but it's something to try.
>Please correct me if I am wrong, but it appears that you are using TCP
>sockets. If so, then there's nothing you can do but ensure that each
>packet contains some sort of delimiter that the receiver will
>recognize as an 'end-of-packet' signal. You see, TCP is a byte-stream
>protocol, and doesn't recognize data constructs of any size other than
>8bit octets. It's up to the sending and receiving applications to
>agree on some standard message format or structure in order to manage
>data larger than a byte.
Exactly.
Unfortunately, there seem to be plenty people who do a "hello
network" program with TCP and notice that on one particular
network configuration, for some values of N, a single write()
of N bytes results in a single read() of N bytes. They design
an entire damn protocol around the faulty assumption that TCP
always works that way. Then they deploy the program in the
"real world" where there are routers and WANs and whatnot, and
the thing doesn't work.
Too bad nobody ever implimented the SOCK_SEQPACKET socket type
for IP. It would be darned handy.
--
Grant Edwards grante Yow! Yow! Are you the
at self-frying president?
visi.com
------------------------------
From: [EMAIL PROTECTED] (Phil Ehrens)
Subject: Re: The roadblocks to printing are infinitely numbered
Date: 3 Apr 2001 19:14:51 GMT
Reply-To: -@-
Gene Heskett wrote:
>1. The gcc-2.96-78 compiler dies on zlib includes, kgcc works past that.
>rawhide... blah blah.
>In other words, the latest (as of yesterday anyway) glibc install.
Aside from the fact that this is the wrong group for this
question...
Are you *trying* to test the bleeding edge of gcc and glibc?
If not, how about falling back to somewhat saner versions?
You are handicapping yourself unnecessarily if you are trying
to get a working Linux install. Toss rawhide back on the
rubbish heap and try something a bit more sensible.
Phil
------------------------------
Subject: Re: did anyone have problems with Daylight Savings changeover?
From: [EMAIL PROTECTED] (H�kon Alstadheim)
Date: 03 Apr 2001 14:38:41 -0400
jtnews <[EMAIL PROTECTED]> writes:
> I was at my system while the changeover from
> standard time to daylight savings time
> occurred and everything appeared ok.
> But when I rebooted my machine after the
> changeover time, my system clock was set
> wrong on boot.
>
> When I set my system clock again, everything
> was ok, even after another reboot.
>
> What's going on?
Set your hardware clock to UTC, and change the appropriate config
things. If you don't want to do that, live with it, or boot windows
once after every change (i.e. once in fall and once in spring) . It
will adjust your hardware clock.
Config things: Find it in the admin tools for your distro, or to do it
yourself, probably you can find a call to hwclock(8) or clock(8) in some
boot or rc script. Add appropriate switch to tell it your hardware
clock is in UTC. Alternatively adding a line at the end of
/etc/adjtime with the single word "UTC" (no quotes) might do you.
--
H�kon Alstadheim, Montreal, Quebec, Canada
------------------------------
From: "Carden, C. (Chris)" <[EMAIL PROTECTED]>
Subject: Equivalent function to IRIX hinv?
Date: Tue, 03 Apr 2001 15:16:33 -0400
Can anyone point me to a way or ways to get a hardware inventory from
Linux? I'm stuck in a dungeon without documentation.
IRIX has a nice function, called hinv, which produces a listing like
this:
> 1 400 MHZ IP30 Processor
> CPU: MIPS R12000 Processor Chip Revision: 3.5
> FPU: MIPS R12010 Floating Point Chip Revision: 0.0
> Main memory size: 2048 Mbytes
> Instruction cache size: 32 Kbytes
> Data cache size: 32 Kbytes
> Secondary unified instruction/data cache size: 2 Mbytes
> Integral SCSI controller 0: Version QL1040B (rev. 2), single ended
> Disk drive: unit 1 on SCSI controller 0
> Disk drive: unit 2 on SCSI controller 0
> Integral SCSI controller 1: Version QL1040B (rev. 2), single ended
> IOC3 serial port: tty1
> IOC3 serial port: tty2
> IOC3 parallel port: plp1
> Graphics board: V8
> Integral Fast Ethernet: ef0, version 1, pci 2
> Iris Audio Processor: version RAD revision 12.0, number 1
Any ideas would be appreciated. Thanks in advance.
--
Chris Carden
Software Engineer
Certified Maya Instructor
Alias|Wavefront, Inc.
[EMAIL PROTECTED]
(248) 521-0676
------------------------------
** 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
******************************