Linux-Development-Sys Digest #377, Volume #8 Wed, 27 Dec 00 22:13:10 EST
Contents:
Re: It it kernel's problem? ("D. Stimits")
Re: HOWTO access SCSI devices from custom modules ? ([EMAIL PROTECTED])
Re: Toronto, Kylix is coming! ("padb")
Re: QUES: C++ Classes for unix system calls (Erik de Castro Lopo)
Re: It it kernel's problem? (Erik de Castro Lopo)
what's the strategy of mmap() synchronize memory with disk file ("Victor")
QUESTIONS about kernel trace ("paul")
kernel Makefile ("paul")
kernel Makefile ("paul")
Re: QUES: C++ Classes for unix system calls (Tom J)
Re: what's the strategy of mmap() synchronize memory with disk file (David Wragg)
Pentium III SSE support ("Lodewijk Smit")
DNS Programming Question (Jen-Chieh Tang)
Re: DNS Programming Question
Re: libpcap problem (Bryan Hackney)
Re: HOWTO access SCSI devices from custom modules ? ("B. Douglas Hilton")
----------------------------------------------------------------------------
Date: Tue, 26 Dec 2000 21:21:54 -0700
From: "D. Stimits" <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Subject: Re: It it kernel's problem?
What chipset does the motherboard use?
Chih-Chang Hsieh wrote:
>
> Hello, all,
> Is this is the right place to ask such a question?
> We are running school web server on Linux 2.2.18.
> But it crashes yesterday, we got following messages:
> Has anyone get the same problem? Our H/W is:
>
> PIII 800 * 2
> 1 GB RAM
> U2W (sym53c895) SCSI interace
> 60 GB RAID
>
> How could we solve this problem? Thanks in advance!
>
> Dec 26 02:57:00 www kernel: Unable to handle kernel paging request at virtual
>address 00221984
> Dec 26 02:57:00 www kernel: current->tss.cr3 = 00101000, %%cr3 = 00101000
> Dec 26 02:57:00 www kernel: *pde = 00000000
> Dec 26 02:57:00 www kernel: Oops: 0000
> Dec 26 02:57:00 www kernel: CPU: 1
> Dec 26 02:57:00 www kernel: EIP: 0010:[__fput+20/72]
> Dec 26 02:57:00 www kernel: EFLAGS: 00010206
> Dec 26 02:57:00 www kernel: eax: 00221960 ebx: f957f620 ecx: fbfc71b8 edx:
>c092bff0
> Dec 26 02:57:00 www kernel: esi: fbfc71b8 edi: fbfc2660 ebp: 00004000 esp:
>ea053f58
> Dec 26 02:57:00 www kernel: ds: 0018 es: 0018 ss: 0018
> Dec 26 02:57:00 www kernel: Process make_wg_home_pa (pid: 6481, process nr: 58,
>stackpage=ea053000)
> Dec 26 02:57:00 www kernel: Stack: fb7e68c0 c0127cab f957f620 f957f620 f9960a80
>c011d62e f957f620 fb7e68c0
> Dec 26 02:57:00 www kernel: 00101000 ea052000 bffffdb0 f9960c80 c0114f58
>fb7e68c0 fb7e68c0 fb7e68c0
> Dec 26 02:57:00 www kernel: c0118736 fb7e68c0 ea052000 4013ef1c 00000000
>bffffdb0 00000000 ea052000
> Dec 26 02:57:00 www kernel: Call Trace: [fput+23/72] [exit_mmap+190/264]
>[mmput+28/52] [do_exit+238/728] [sys_exit+15/16] [system_call+52/56]
> Dec 26 02:57:00 www kernel: Code: 8b 40 24 85 c0 74 07 53 56 ff d0 83 c4 08 c7 43 08
>00 00 00
>
> --
> Name: Chih-Chang Hsieh MailTo: [EMAIL PROTECTED]
> Tel: +886-7-3121101 ext 2184 or 2290 Fax: +886-7-3133807
> Org: KMU Computer Center Kaohsiung, Taiwan
------------------------------
From: [EMAIL PROTECTED]
Crossposted-To: comp.periphs.scsi
Subject: Re: HOWTO access SCSI devices from custom modules ?
Date: Wed, 27 Dec 2000 05:28:28 GMT
This is what Alan Cox replied to my query...
Subject: Re: query: SCSI disk ioctl from kernel modules
To: [EMAIL PROTECTED] (Milind Changire)
Date: Tue, 26 Dec 2000 21:35:14 +0000 (GMT)
CC: [EMAIL PROTECTED] (Alan Cox)
From: Alan Cox <[EMAIL PROTECTED]>
> Also, the SCSI-2 commands have to be sent to the SCSI disks
> at specific intervals. I plan to use the "timer queue"
> to get this task accomplished within the module. Is this a
> good choice ?
SCSI requires calls are made in a task context -so you will need to
create a kernel thread to do the work.
In article <91vhun$3el$[EMAIL PROTECTED]>,
Alain-Pierre CHERTIER <[EMAIL PROTECTED]> wrote:
> Hello.
>
> Normally you can't directly use standard i/o C language lib functions
> inside device driver (?) modules => you can't make open/read/write
> standard calls.
>
> You should try ioctls by the low level way to pass through the
> /dev/sg generic SCSI services or issue direct ioctls to the
> scsi device driver controlling the wanted scsi physical device.
>
> At 1st level, consult the SCSI programming HOWTO manual which
> gives a complete example of identifying scsi devices
> on the scsi bus (this is through /dev/sg generic device interface
> in user mode).
>
> Programming modules often needs to manage kernel mode constraints
> which is not as easy as programming in normal user mode...
>
> Don't hesitate to email Linux community programmers who have
> involved in developping the linux scsi services. One person
> who always answers to our requests is Alan Cox who can indicate
> right contacts when he (rarely) doesn't know the answer himself !
>
> ;-)
>
> Alain-Pierre CHERTIER <[EMAIL PROTECTED]>
Sent via Deja.com
http://www.deja.com/
------------------------------
From: "padb" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development,comp.os.linux.development.apps
Subject: Re: Toronto, Kylix is coming!
Date: Wed, 27 Dec 2000 06:37:03 GMT
Got any hard facts? Delphi must have a share of the market comparable if
perhaps somewhat less than, Visual Basic.
I have not seen Kylix, but I am eagerly anticipating it, because if it is as
powerful as Delphi, it will be very easy to visually create graphical
windowed applications in Linux; easy enough that the average high school
programming student could tie together the components for a simple data
based web publishing tool in a couple of afternoons.
Regardless of present market share, this is the power that many of us
anticipate in Kylix, and it's biggest perceived advantage.
I hope to test the release version soon and speak from some experience !
"John Smith" <[EMAIL PROTECTED]> wrote in message
news:cMW16.178435$[EMAIL PROTECTED]...
> Oh please...probably less than 2% of all Windows programs are written in
> Delphi and Borland C++ Builder. About 95% are written in either Visual
> Basic or Microsoft Visual C++ (with Microsoft Foundation Classes). I'm
not
> sure what universe you're living in, but it's definitely not the one the
> rest of us are in :-)
>
> I think Kylix will be a big boon for Linux, too, but let's not go crazy on
> the claims :-)
>
>
> "Steffen K�hler" <[EMAIL PROTECTED]> wrote in message
> news:90qbav$4ph$[EMAIL PROTECTED]...
> >
>
> > So why using Kylix ? - it's not because to learn again another tool -
but
> > the BIG advantage is that with this tool it should be possible to
transfer
> > approx. 30% of all windows programs to Linux - also if you stroke out
all
> > the programs which only exist to solve windows problems (and which so
are
>
>
>
------------------------------
From: Erik de Castro Lopo <[EMAIL PROTECTED]>
Subject: Re: QUES: C++ Classes for unix system calls
Date: Wed, 27 Dec 2000 07:11:59 GMT
Tom J wrote:
>
> Hello. Are there classes in C++ for unix system calls? Especially
> under linux? Also POSIX stuff.
Why would you want to do this? What possible advantage can this have?
Unix/Posix system calls have relatively simple procedural interfaces.
Encapsulating them in C++ isms will only make them slower.
> My boss is asking.
Find a new boss. Your current boss seems like a moron. From here, it
looks like he's trying to achieve buzzword compliance without having
a clue about the reality of writing software.
> By the way, have you ever seen a DOS C hacker rewrite all of your
> threaded POSIX unix code to replace the threads with alternation in
> one thread between different activities; replace your driver modules
> with direct I/O port access by the applicaiton level; replace POSIX
> signals with old unix signals and signal handlers; replace your
> private_XtMainLoop with an occassional peek at the XEvent queue from
> the main thread, and then force these changes down the throat of the
> project as riders other features that are due? What did you do?
Like others have said. Resign, run as far away as possible. BTW, did
the bos mentioned above employ this person?
Erik
--
+-------------------------------------------------+
Erik de Castro Lopo [EMAIL PROTECTED]
+-------------------------------------------------+
Hiesenbugs - The bugs that go away when you turn on debugging.
------------------------------
From: Erik de Castro Lopo <[EMAIL PROTECTED]>
Subject: Re: It it kernel's problem?
Date: Wed, 27 Dec 2000 07:13:54 GMT
Chih-Chang Hsieh wrote:
> =
> Hello, all,
> Is this is the right place to ask such a question?
> We are running school web server on Linux 2.2.18.
> But it crashes yesterday, we got following messages:
> Has anyone get the same problem? Our H/W is:
> =
> PIII 800 * 2
Are these really 800 mega hertz processors or are you overclocking?
If you're overclocking, stop it :-).
Erik
-- =
+-------------------------------------------------+
Erik de Castro Lopo [EMAIL PROTECTED]
+-------------------------------------------------+
"A program invented (sic) by a Finnish computer hacker and handed out
free =
in 1991 cost investors in Microsoft $11 billion (=A36.75 billion) this
week."
-- Andrew Butcher in the UK's Sunday Times, Feb 20th, 1999
------------------------------
From: "Victor" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: what's the strategy of mmap() synchronize memory with disk file
Date: Wed, 27 Dec 2000 16:22:42 +0800
Reply-To: "Victor" <[EMAIL PROTECTED]>
Hi,all
who knows the exact time(or the strategy) when system write the mmap() file
in the
memory to disk file?
------------------------------
From: "paul" <[EMAIL PROTECTED]>
Subject: QUESTIONS about kernel trace
Date: Wed, 27 Dec 2000 17:04:17 +0800
Sorry, I am junior in Linux!
Perhaps, they are not smart questions!
Because I do not know where to find its answer!!
<0> what is the shortest way to debug kernel?!
It is so slow to add printk, rebuild zImage , download zImage and
try to boot ....
<1> I read some books and documents about the kernel boot
I get the sequence from them.....
BOOTSECT.S,HEAD.S,.....-> start_kernel() in main.c -> mount root,
init....
but I had traced the start_kernel() in main(), I found a function
init() started
after the start_kernel().
My questions is that
calling "start_kernel()",and then "init()" (all in main.c)
is definitely sequence?!
(I use ARM-LINUX, maybe not in X86-linux?)
<2> "__init" (in front of functions) has any other meaning?!
such as AUTO-RUN by kernel?!.....
<3> about the "__initcall()"?!
I trace how the "cdu31a_init()" in cdu31a.c start (if cdu31a.o is
built-in-driver)!!
cdu31a_init() <- blk_dev_init() <- device_init() <-
partition_setup()
but finally end in "__initcall(partition_setup())" in the tail of
fs/partitions/check.c
what is the meaning?! auto-start?!
or how does it start?!......and so do aha1542_setup() , h8_init()
<4> what kind of driver must be built-in-driver in kernel (not
module-driver)?
===============
paulong
------------------------------
From: "paul" <[EMAIL PROTECTED]>
Subject: kernel Makefile
Date: Wed, 27 Dec 2000 17:16:34 +0800
anybody can tell detailedly about the script of Kenerl Makefile?!
===================================================
SUBDIRS =kernel drivers mm fs net ipc lib
linuxsubdirs: $(patsubst %, _dir_%, $(SUBDIRS))
$(patsubst %, _dir_%, $(SUBDIRS)) : dummy include/linux/version.h
include/config/MARKER
$(MAKE) CFLAGS="$(CFLAGS) $(CFLAGS_KERNEL)" -C $(patsubst _dir_%, %, $@)
vmlinux: $(CONFIGURATION) init/main.o init/version.o linuxsubdirs
$(LD) $(LINKFLAGS) $(HEAD) init/main.o init/version.o \
--start-group \
$(CORE_FILES) \
$(DRIVERS) \
$(NETWORKS) \
$(LIBS) \
--end-group \
-o vmlinux
$(NM) vmlinux | grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw]
\)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | sort > System.map
--
===============
���T�s paulong
[EMAIL PROTECTED]
------------------------------
From: "paul" <[EMAIL PROTECTED]>
Subject: kernel Makefile
Date: Wed, 27 Dec 2000 17:16:52 +0800
anybody can tell detailedly about the script of Kenerl Makefile?!
===================================================
SUBDIRS =kernel drivers mm fs net ipc lib
linuxsubdirs: $(patsubst %, _dir_%, $(SUBDIRS))
$(patsubst %, _dir_%, $(SUBDIRS)) : dummy include/linux/version.h
include/config/MARKER
$(MAKE) CFLAGS="$(CFLAGS) $(CFLAGS_KERNEL)" -C $(patsubst _dir_%, %, $@)
vmlinux: $(CONFIGURATION) init/main.o init/version.o linuxsubdirs
$(LD) $(LINKFLAGS) $(HEAD) init/main.o init/version.o \
--start-group \
$(CORE_FILES) \
$(DRIVERS) \
$(NETWORKS) \
$(LIBS) \
--end-group \
-o vmlinux
$(NM) vmlinux | grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw]
\)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | sort > System.map
--
===============
paulong
------------------------------
From: [EMAIL PROTECTED] (Tom J)
Subject: Re: QUES: C++ Classes for unix system calls
Date: Wed, 27 Dec 2000 14:17:52 GMT
In article <[EMAIL PROTECTED]>,
Erik de Castro Lopo <[EMAIL PROTECTED]> wrote:
>Tom J wrote:
>>
>> Hello. Are there classes in C++ for unix system calls? Especially
>> under linux? Also POSIX stuff.
>
>Why would you want to do this? What possible advantage can this have?
>
>Unix/Posix system calls have relatively simple procedural interfaces.
>Encapsulating them in C++ isms will only make them slower.
Wrong wrong wrong. First of all, I have written classes for LynxOS
for POSIX threads, mutexes, serial lines and such. In no way does a
thread run more slowly because it is started by a C++ program; you are
wrong about that. True, the start-up of the thread was from the
constructor, which probably added a function call through a pointer,
what was that, an extra 400ns for a one-time cost? The mutex calls
would also be through a pointer to a wrapper function, but that's also
next to nothing. The team developing an ultra high-performance
embedded system can measure these effects and decide to use mutex
calls directly, but it is not necessary on most systems. The benefits
are the benefits of encapsulation and abstraction; the interface I
presented in C++ was much simpler than the POSIX interface, which had
options and features that I never needed. This also made it easier
for other C++ programmers to use threads and so on. I have written
assembler when necessary but I never do when not necessary.
>
>> My boss is asking.
>
>Find a new boss. Your current boss seems like a moron. From here, it
>looks like he's trying to achieve buzzword compliance without having
>a clue about the reality of writing software.
--
Tom J.; tej at world.std.com Massachusetts USA; MSCS; Systems Programmer
Dist. Real-Time Data Acquisition S/W for Science and Eng. under POSIX,
C, C++, X, Motif, Graphics, Audio http://world.std.com/~tej
------------------------------
From: David Wragg <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: Re: what's the strategy of mmap() synchronize memory with disk file
Date: 27 Dec 2000 11:42:28 +0000
"Victor" <[EMAIL PROTECTED]> writes:
> who knows the exact time(or the strategy) when system write the mmap() file
> in the
> memory to disk file?
It isn't specified. But you can use msync() to force the writes to
disk.
David Wragg
------------------------------
From: "Lodewijk Smit" <[EMAIL PROTECTED]>
Subject: Pentium III SSE support
Date: Wed, 27 Dec 2000 22:53:33 +0100
Crossposted-To:
alt.os.linux.slackware,intel.microprocessors.pentium_iii,linux.sources.kernel
Hi,
I am running the linux 2.2.16 kernel (slackware distr. 7.1).
Now I would like to program using SSE instructions.
The kernel does not support this.
I've found patches for this issue for kernels 2.2.5 and 2.2.12 (for redhat
6.x).
I tried (knowing better...) to compile my kernel with this patches but it
does not work (of course).
Does anybody know how to get this running with kernel 2.2.16??
Support for the Pentium III features is a very legal question (W98 + NT 4
SP4 already have it....uhhh)
Thanks in advance,
With kind regards,
Lodewijk
------------------------------
From: Jen-Chieh Tang <[EMAIL PROTECTED]>
Subject: DNS Programming Question
Date: Thu, 28 Dec 2000 00:41:06 +0000 (UTC)
Hi,
I was wondering how domain names are partitioned.
For example, www.ucdavis.edu can be broken up into
three parts, www is the host, ucdavis is the domain
and edu is the TLD. But for pc1.cs.ucdavis.edu, I
am not sure on how to separate it out. I'm pretty
sure that pc1 is the host, cs is the sub-domain,
ucdavis is the domain, and edu is the TLD. Is the
cs subdomain string part of the 26-character limit
for domain names ? Thanks.
--
Tom Tang
[EMAIL PROTECTED]
------------------------------
From: [EMAIL PROTECTED] ()
Subject: Re: DNS Programming Question
Date: Thu, 28 Dec 2000 00:58:49 -0000
In article <92e272$7ip$[EMAIL PROTECTED]>,
Jen-Chieh Tang <[EMAIL PROTECTED]> wrote:
> I was wondering how domain names are partitioned.
> For example, www.ucdavis.edu can be broken up into
> three parts, www is the host, ucdavis is the domain
> and edu is the TLD. But for pc1.cs.ucdavis.edu, I
> am not sure on how to separate it out. I'm pretty
> sure that pc1 is the host, cs is the sub-domain,
> ucdavis is the domain, and edu is the TLD. Is the
> cs subdomain string part of the 26-character limit
> for domain names ? Thanks.
Each dot creates a seperate sub-domain that can have
its own name server. So looking up pc1.cs.ucdavis.edu
you get the name server for ucdavis.edu first. It might
then point you to another server for cs.ucdavis.edu.
Read the RFCs for more info.
--
http://www.spinics.net/linux
------------------------------
From: Bryan Hackney <[EMAIL PROTECTED]>
Subject: Re: libpcap problem
Date: Wed, 27 Dec 2000 19:29:11 -0600
Jen-Chieh Tang wrote:
>
> Hello :
>
> I am posting this message in the forum since I
> haven't been getting any luck at the linux.networking
> forum. I am running RH 7.0 with gcc version 2.96 and
> ld version 2.10.90 with all patches installed.
> However, when I run my libpcap code below, it never
> comes out of pcap_dispatch, or calls the packet
> handler. This code worked on FreeBSD, so I am really
> confused. Any help would be greatly appreciated.
> Thanks.
>
>
I started a network monitor called
http://bhconsult.com/packetspy
It's libpcap based. I never quite finished it. Anyway, the libpcap
w/RH6.x is broken wrt what you can compile from the libpcap sources.
That's the fixaround.
--
Bryan Hackney / BHC / [EMAIL PROTECTED]
http://bhconsult.com/
http://bhconsult.com/bh/pgp.key
------------------------------
From: "B. Douglas Hilton" <[EMAIL PROTECTED]>
Crossposted-To: comp.periphs.scsi
Subject: Re: HOWTO access SCSI devices from custom modules ?
Date: Wed, 27 Dec 2000 20:25:53 -0500
That seems sound. With Linux becoming so much more SMP capable in
the newer kernels, almost everything needs to be done using threads.
If you attempt to hook into the timer queue, you will most probably
crash a multiprocessor system.
- Doug
[EMAIL PROTECTED] wrote:
> > ... at specific intervals. I plan to use the "timer queue"
> > to get this task accomplished within the module. Is this a
> > good choice ?
>
> SCSI requires calls are made in a task context -so you will need to
> create a kernel thread to do the work.
------------------------------
** 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
******************************