Linux-Development-Sys Digest #654, Volume #8 Thu, 19 Apr 01 13:13:16 EDT
Contents:
Large file corruption problem (bill davidsen)
unregistering sysctl (Doc)
Is linux kernel preemptive?? ("v.nagasrinivas")
Re: Is linux kernel preemptive?? (Lew Pitcher)
Re: Module trouble ("Ivor Cox")
Re: Is linux kernel preemptive?? (=?iso-8859-1?Q?Andr=E9?= David)
Re: Is linux kernel preemptive?? (Lew Pitcher)
Re: Is linux kernel preemptive?? (Frank Sweetser)
Re: Is linux kernel preemptive?? (Joe Pfeiffer)
making "/proc" sense (James Stephens)
Re: Porting from Window to Linux ... C++ programming problem (Erik Max Francis)
Re: how to remap the memory on PCI card to a new virtual memory? (Grant Edwards)
setting up a skb (alan)
Re: Who can help me? ([EMAIL PROTECTED])
PCI card setup question ("Eric F. Richards")
Re: IO system throughput (Greg Copeland)
Re: Is linux kernel preemptive?? (Greg Copeland)
Re: making "/proc" sense (Greg Copeland)
----------------------------------------------------------------------------
Crossposted-To: comp.os.linux.development.apps
Subject: Large file corruption problem
From: [EMAIL PROTECTED] (bill davidsen)
Date: Thu, 19 Apr 2001 11:30:01 GMT
When compiling for largefile support, the additional define
-D_XOPEN_SOURCE=500 is required to get pread defined to pread64. I think
this is a bug, as it silently makes the pread/pwrite always access the
first 4GB of a file, putting data in the wrong place.
--
bill davidsen <[EMAIL PROTECTED]>
CTO, TMR Associates, Inc
Doing interesting things with little computers since 1979.
--
bill davidsen <[EMAIL PROTECTED]>
CTO, TMR Associates, Inc
Doing interesting things with little computers since 1979.
------------------------------
From: Doc <[EMAIL PROTECTED]>
Subject: unregistering sysctl
Date: Thu, 19 Apr 2001 13:40:37 +0200
hi,
i'm working with a 2.4.3 kernel.
1)
i've realized a sysctl subtree for my module under /proc/sys/net and i
have some problems when i try unregister it. the subtree is like this:
/proc/sys/net/my_dir
/proc/sys/net/mydir/my_entry
/proc/sys/net/mydir/my_subdir
/proc/sys/net/mydir/my_subdir/my_subdirentry
entries are all strings.
if i write to "my_entry" (echo "data"> ...../my_entry) i have no
problem unregistering the interface but if i do the same thing with
"my_subdirentry" when i unregister the interface that entry is no longer
removed. if i do *not* write to that entry, all the subtree is removed
correctly. no error messages are given.
2)
it's possible to change the procname at runtime (after having registered
the tables)? i've tried to barely change the procname but it doesn't
works. do i have to unregister and register again to see the change?
ciao
--
maruko.cjb.net - Seti@Home applets
Designed for Windows
Powered by Linux
------------------------------
From: [EMAIL PROTECTED] ("v.nagasrinivas")
Subject: Is linux kernel preemptive??
Date: Thu, 19 Apr 2001 13:02:03 +0000 (UTC)
This is a multi-part message in MIME format.
=======_NextPart_000_0029_01C0C8FF.89853CC0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi,=20
I have a doubt.....Is linux(2.4.x)kernel is=20
preemptive ...??
thanks,
Srinivas
v.naga srinivas
YVL Software Consultancy
B4,Q1,6th floor,Hi-Tec city,
CyberTowers, Madhapur,
Hyderabad - 500033
Andhra Pradesh
INDIA
phone : 091-040-3110200(off)
091-040-3810616(res)
visit me: www.geocities.com/cheluvi
=======_NextPart_000_0029_01C0C8FF.89853CC0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2314.1000" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi, </FONT></DIV>
<DIV><FONT face=3DArial=20
size=3D2> I have a=20
doubt.....Is linux(2.4.x)kernel is </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>preemptive ...??</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>thanks,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Srinivas</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>v.naga srinivas<BR>YVL Software=20
Consultancy<BR>B4,Q1,6th floor,Hi-Tec city,<BR>CyberTowers,=20
Madhapur,<BR>Hyderabad - 500033<BR>Andhra Pradesh<BR>INDIA<BR>phone :=20
091-040-3110200(off)<BR> &=
nbsp; =20
091-040-3810616(res)<BR>visit me: <A=20
href=3D"http://www.geocities.com/cheluvi">www.geocities.com/cheluvi</A></=
FONT></DIV></BODY></HTML>
=======_NextPart_000_0029_01C0C8FF.89853CC0==
--
Posted from ns.stph.net [196.12.32.2]
via Mailgate.ORG Server - http://www.Mailgate.ORG
------------------------------
From: [EMAIL PROTECTED] (Lew Pitcher)
Subject: Re: Is linux kernel preemptive??
Reply-To: [EMAIL PROTECTED]
Date: Thu, 19 Apr 2001 13:29:12 GMT
On Thu, 19 Apr 2001 13:02:03 +0000 (UTC), [EMAIL PROTECTED] ("v.nagasrinivas")
wrote:
>This is a multi-part message in MIME format.
Ugh! No need for a mime-format of a plain-text message
>Hi,=20
> I have a doubt.....Is linux(2.4.x)kernel is=20
>preemptive ...??
Yes, it is.
>thanks,
>Srinivas
>
Lew Pitcher
IT Consultant, Development Services
Toronto Dominion Bank Financial Group
(Opinions expressed are my own, not my employers')
------------------------------
From: "Ivor Cox" <[EMAIL PROTECTED]>
Subject: Re: Module trouble
Date: Thu, 19 Apr 2001 14:40:04 +0100
I have looked sternly at the code for a while ...
I have put in the direct path for the module (/...) using the
lib<mymodule>.so and the lib<mymodule>so.<version> and I always get file not
found.
I am sure I am shooting myself in the foot somewhere - but I can't see it.
The LD_LIBRARY_PATH I supply satisfies my module which is linked but not the
ones accessed using dlopen!.
Has anyone some suggestions?
Ivor Cox
"Nix" <$}xinix{[email protected]> wrote in message
news:[EMAIL PROTECTED]...
> On Wed, 11 Apr 2001, Ivor Cox said:
> > I substituted libc.so for <my module> in thye dlopen() call - in this
case
> > the error was "invalid ELF header".
>
> That's because /usr/lib/libc.so is a linker script, not an ELF shared
> object.
>
> --
> Rusks for Peace!
------------------------------
From: =?iso-8859-1?Q?Andr=E9?= David <[EMAIL PROTECTED]>
Subject: Re: Is linux kernel preemptive??
Date: Thu, 19 Apr 2001 15:37:33 +0200
This is a multi-part message in MIME format.
==============811CC91A7CFFF2A3D765F5E7
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
> > I have a doubt.....Is linux(2.4.x)kernel is=20
> >preemptive ...??
>
> Yes, it is.
Not fully preemptive ... That's why you have real-time
extensions/distributions/patches. Right?
--
"Share the code. If you hide it ain't good."
Popular knowledge
==============811CC91A7CFFF2A3D765F5E7
Content-Type: text/x-vcard; charset=us-ascii;
name="Andre.David.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Andr� David
Content-Disposition: attachment;
filename="Andre.David.vcf"
begin:vcard
n:David;Andr�
tel;work:+41792013849
x-mozilla-html:FALSE
org:CERN - Centre Europeen de Recherche Nucleaire;Experimental Physics Division - NA60
Experiment
adr:;;;;;;
version:2.1
email;internet:[EMAIL PROTECTED]
note:Geneva, Switzerland
x-mozilla-cpt:;-11552
fn:Andr� David
end:vcard
==============811CC91A7CFFF2A3D765F5E7==
------------------------------
From: [EMAIL PROTECTED] (Lew Pitcher)
Subject: Re: Is linux kernel preemptive??
Reply-To: [EMAIL PROTECTED]
Date: Thu, 19 Apr 2001 13:50:08 GMT
On Thu, 19 Apr 2001 15:37:33 +0200, =?iso-8859-1?Q?Andr=E9?= David
<[EMAIL PROTECTED]> wrote:
>This is a multi-part message in MIME format.
>--------------811CC91A7CFFF2A3D765F5E7
>Content-Type: text/plain; charset=us-ascii
>Content-Transfer-Encoding: 7bit
>
>
>> > I have a doubt.....Is linux(2.4.x)kernel is=20
>> >preemptive ...??
>>
>> Yes, it is.
>
>Not fully preemptive ... That's why you have real-time
>extensions/distributions/patches. Right?
Well, I'm not an expert on Linux kernel code, but...
the original post didn't qualify to what degree 'preemptive' meant, and I can
guarantee that the kernel is to some degree preemptive. It certainly isn't a
non-preemptive kernel <g>.
Lew Pitcher
IT Consultant, Development Services
Toronto Dominion Bank Financial Group
(Opinions expressed are my own, not my employers')
------------------------------
From: [EMAIL PROTECTED] (Frank Sweetser)
Subject: Re: Is linux kernel preemptive??
Date: 19 Apr 2001 13:53:30 GMT
Andr� David <[EMAIL PROTECTED]> wrote:
>Not fully preemptive ... That's why you have real-time
>extensions/distributions/patches. Right?
Nope. In fact, the real time patches are there *because* the
kernel is preemptive.
--
Frank Sweetser rasmusin at wpi.edu, fs at suave.net | $ x 15
Full-time WPI Network Tech, Part time Linux/Perl guy |
To Perl, or not to Perl, that is the kvetching.
-- Larry Wall in <[EMAIL PROTECTED]>
------------------------------
From: Joe Pfeiffer <[EMAIL PROTECTED]>
Subject: Re: Is linux kernel preemptive??
Date: 19 Apr 2001 08:09:36 -0600
[EMAIL PROTECTED] (Lew Pitcher) writes:
> >Not fully preemptive ... That's why you have real-time
> >extensions/distributions/patches. Right?
>
> Well, I'm not an expert on Linux kernel code, but...
> the original post didn't qualify to what degree 'preemptive' meant, and I can
> guarantee that the kernel is to some degree preemptive. It certainly isn't a
> non-preemptive kernel <g>.
By the definition I'm familiar with -- that user programs get
preempted by the kernel, and don't need to explicitly relinquish
control either explicitly or by requesting services -- it is fully
preemptive.
Being able to do realtime stuff, with guaranteed maximum latencies and
the like, requires more than just being preemptive.
--
Joseph J. Pfeiffer, Jr., Ph.D. Phone -- (505) 646-1605
Department of Computer Science FAX -- (505) 646-1002
New Mexico State University http://www.cs.nmsu.edu/~pfeiffer
SWNMRSEF: http://www.nmsu.edu/~scifair
------------------------------
From: James Stephens <[EMAIL PROTECTED]>
Subject: making "/proc" sense
Date: Thu, 19 Apr 2001 10:21:53 -0400
I am interested in getting to know /proc.
The Question: where can I get info about what is being displayed, and
the format? 'files' like /proc/pci have loads of labels but
/proc/sys/vm/* or /proc/PID/statm do not. If anybody knows where I can
get a description of the fields it would be helpful.
Thank-you
------------------------------
From: Erik Max Francis <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: Re: Porting from Window to Linux ... C++ programming problem
Date: Thu, 19 Apr 2001 08:06:03 -0700
[EMAIL PROTECTED] wrote:
> I'm porting my module from windows to linux. It compile & runs well in
> windows but in linux environment - failed ... some errors. Frankly
> speaking, I'm just a Linux beginner. What's the possible reasons?
There is no possible way of knowing this without seeing the errors.
There are all sorts of pitfalls and problems when porting a program
between two platforms, whether Windows and Linux or not. They could not
possibly be summarized in a way that would meaningfully help you.
> ps: Am I posting to the right newsgroup?
comp.os.linux.development.system is for discussion about the kernel, and
so is off-topic for your question. [Followups out of there.]
--
Erik Max Francis / [EMAIL PROTECTED] / http://www.alcyone.com/max/
__ San Jose, CA, US / 37 20 N 121 53 W / ICQ16063900 / &tSftDotIotE
/ \ Never make a promise or plan / Take a little love where you can
\__/ Florence, _Chess_
Physics reference / http://www.alcyone.com/max/reference/physics/
A physics reference.
------------------------------
From: [EMAIL PROTECTED] (Grant Edwards)
Subject: Re: how to remap the memory on PCI card to a new virtual memory?
Date: Thu, 19 Apr 2001 15:30:54 GMT
In article <[EMAIL PROTECTED]>, �B�_�� wrote:
>I have a PCI device which have extra memory on it.
>I want to use the ioremap() function to get a virtual address
>so that I can access the memory.
>But when I try to load the module, it fails and tells me ioremap() and
>readb() are unresolved symbols.
>I use 2.2.14 linux kernel.
>Is there anybody who knows what's wrong?
>or can you send me a simple example code to teach me how to use ioremap()
>correctly?
There's an example driver that does this at
ftp://ftp.visi.com/users/grante/stuff/demomm.tar.gz
It provides three minor devices that all support the memmap()
system call. Two of them map regions of memory on the PCI
board, and the third is a locked-down page of system RAM that
can be used as a DMA buffer.
--
Grant Edwards grante Yow! I'm having
at a tax-deductible
visi.com experience! I need an
energy crunch!!
------------------------------
From: alan <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.networking,linux.dev.kernel
Subject: setting up a skb
Date: Thu, 19 Apr 2001 12:24:08 -0400
Does anyone know of a good source for information on setting up a skb
before calling netif_rx(). I've been reading through the kernel source and
also have read Linux Device Drivers...but I still have a few
questions..Most importantly, if I have an IP packet and some mac addresses
( but not initially in ethernet packet order) how should I set them up to
get the packet properly processed by the stack. (alignment, order, etc...)
Thanks
------------------------------
From: [EMAIL PROTECTED]
Subject: Re: Who can help me?
Date: 19 Apr 2001 16:31:33 GMT
In article <XbHC6.115$[EMAIL PROTECTED]>, J Hayward
<[EMAIL PROTECTED]> writes:
>Hello,
>
>ja wrote:
>>
>>
>> %cc -o AppTest AppTest.c
>> AppTest.c: In function 'Attempt Connection':
>> AppTest.c:253: in compatible type for argument 2 of 'connect'
>> AppTest.c: In function 'GetReturnStatus':
>> AppTest.c:storage size of 'readFds' isn't known.
>>
>>
><snip...>
>> int GetReturnStatus ()
>> {
>> int BytesRead;
>> int selectCount;
>> //AppTest.c:storage size of 'readFds' isn't known.
>> //How to modify?
>
>I could might be wrong, I'm just a beginning programmer but remove "struct"
>from this line:
>
>> struct fd_set readFds;
>
>should read:
>
>fd_set readFds;
>
>
>Regards,
> Jim H
>
That will only work if you did a "typedef struct <whatever> fd_set" or it was
like that in a system header. Otherwise, the "struct fd_set readFds;" is
correct.
Justin Hibbits
----- Posted via NewsOne.Net: Free (anonymous) Usenet News via the Web -----
http://newsone.net/ -- Free reading and anonymous posting to 60,000+ groups
NewsOne.Net prohibits users from posting spam. If this or other posts
made through NewsOne.Net violate posting guidelines, email [EMAIL PROTECTED]
------------------------------
From: "Eric F. Richards" <[EMAIL PROTECTED]>
Subject: PCI card setup question
Date: Thu, 19 Apr 2001 16:41:40 GMT
Greetings, all...
I'm new to Linux drivers but not to drivers in general... I'm
working on a driver for a PCI card and have a basic question:
Everyone who has written a PCI driver knows that PCI cards go
through a specific sequence of events to determine whether or
not each of the (up to) 6 regions are memory or I/O space
and how big they are. Looking at struct pci_dev in
/usr/include/linux/pci.h it looks like that structure has those
fields built in.
So: Do I fill them? Does the kernel fill them? If the latter,
do I make a call to do so or is it done automagically for me?
The old O'reilly book is too dated on this to be much help, and
I can't wait for the next edition.
The kernel I'm using is 2.2.14-5.0 from Red Hat.
Thanks in advance for any help!
Eric
--
Eric F. Richards
[EMAIL PROTECTED]
"The weird part is that I can feel productive even when I'm doomed."
- Dilbert
------------------------------
Subject: Re: IO system throughput
From: Greg Copeland <[EMAIL PROTECTED]>
Date: 19 Apr 2001 11:49:03 -0500
[EMAIL PROTECTED] writes:
[snip]
>
> The issues with FibreChannel are pretty clear:
>
> a) It's expensive hardware, so there aren't vast numbers of Linux
> users toying with it
>
> b) Solaris seems to be the platform of choise for SAN
>
> Put those together and you get the point that most of the effort goes
> into Solaris drivers, what with vendor support and such, whilst Linux
> gets support from people that have hardware and want to use it with
> Linux.
>
> Now, if we're talking about a $50 IDE controller, a $250 SCSI
> controller, or a $200 motherboard, there's certainly going to be lots
> of people that can easily afford to pick up hardware on the basis that
> it _should_, _eventually_, be supported. Put together 20 people that
> do that, and work on drivers, and decent support can come quickly.
> Even if it doesn't, it's not a _real_ big deal to write off $50 worth
> of hardware.
>
> In contrast, I'm not going to be buying an $80K SAN device on the
> basis that it _might_ _eventually_ be supported.
> --
Thanks for the summary. You make valid points. In short, I don't think
I'll be trying a fiber implementation for a while. Let's face it, until
you start to see a small segment of Linux "desktop" users with it, or
even a small slice of the server pie, I don't think you're going to see
any real support with fiber and Linux.
It's worth pointing out that several other articles show that NT has a
significant advantage when it comes to extremely heavy I/O because it
supports an asynchronous I/O model. Linux needs this very bad. It was
one thing for Linux to shrug his shoulders when async I/O didn't make
much sense for the low-end servers, however, Linux is trying to get into
the enterprise which pretty much demands asynchronous I/O. Let's face
it, databases and build-your-own SANs and NASs pretty much require this
type of heavy duty support. If you read some of Oracle's papers, you'll
find that they slam Linux from time to time for not supporting it too.
As far as I can tell, with plenty of journaling file-systems coming the
way of Linux, SMP and scheduler issues mostly addressed, and >2G files,
the only thing that Linux needs to proper fiber support and asynchronous
I/O support. As much as I hate NT (I've used it tons, so I'm allowed to
say that), MS did right by building in asynchronous I/O in almost all
facets of NT's kernel and API.
--
Greg Copeland, Principal Consultant
Copeland Computer Consulting
==================================================
PGP/GPG Key at http://www.keyserver.net
DE5E 6F1D 0B51 6758 A5D7 7DFE D785 A386 BD11 4FCD
==================================================
------------------------------
Subject: Re: Is linux kernel preemptive??
From: Greg Copeland <[EMAIL PROTECTED]>
Date: 19 Apr 2001 11:55:46 -0500
Prior to 2.4, Linux had lots of system calls that were not preemptive (coarse
grain locks; networking was one such beast). With 2.4, Linux got lots of fine
grained locks which allows the kernel to be fully preemptive. If I recall,
there are still a couple of exceptions to the rule, however, most people now
consider Linux to be a "fully" preemptive kernel.
Joe Pfeiffer <[EMAIL PROTECTED]> writes:
[snip]
> By the definition I'm familiar with -- that user programs get
> preempted by the kernel, and don't need to explicitly relinquish
> control either explicitly or by requesting services -- it is fully
> preemptive.
>
> Being able to do realtime stuff, with guaranteed maximum latencies and
> the like, requires more than just being preemptive.
--
Greg Copeland, Principal Consultant
Copeland Computer Consulting
==================================================
PGP/GPG Key at http://www.keyserver.net
DE5E 6F1D 0B51 6758 A5D7 7DFE D785 A386 BD11 4FCD
==================================================
------------------------------
Subject: Re: making "/proc" sense
From: Greg Copeland <[EMAIL PROTECTED]>
Date: 19 Apr 2001 11:56:58 -0500
I know there is some documented in the /usr/src/linux/Documentation
directories. Look around there and see what you can find.
James Stephens <[EMAIL PROTECTED]> writes:
> I am interested in getting to know /proc.
>
> The Question: where can I get info about what is being displayed, and
> the format? 'files' like /proc/pci have loads of labels but
> /proc/sys/vm/* or /proc/PID/statm do not. If anybody knows where I can
> get a description of the fields it would be helpful.
>
> Thank-you
>
--
Greg Copeland, Principal Consultant
Copeland Computer Consulting
==================================================
PGP/GPG Key at http://www.keyserver.net
DE5E 6F1D 0B51 6758 A5D7 7DFE D785 A386 BD11 4FCD
==================================================
------------------------------
** 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
******************************