Linux-Development-Sys Digest #935, Volume #7      Tue, 6 Jun 00 04:13:08 EDT

Contents:
  Oops in bottom half ([EMAIL PROTECTED])
  Re: Where to get Java Compiler ([EMAIL PROTECTED])
  Re: Oops in bottom half ([EMAIL PROTECTED])
  Hisax Problem ("Dave")
  Re: farjmp and farcall (David Wragg)
  Re: posix threads ("Norman Black")
  HELP: Linux Net Driver confusions (Tom Roberts)
  Linux NFS (Jerry Alexander)
  Re: Increase the priority of a thread... how? ("Norman Black")
  Debuger ("Jun Chen")
  Re: Linux NFS (David T. Blake)
  Linux IPC costs too much time ("XuYifeng")
  os dev under linux (Brian J Luczkiewicz)
  Re: RS-485 (Clayton Haapala)
  Re: Where to get Java Compiler (Timothy Murphy)
  Newsgroup for make. (Thaddeus L Olczyk)
  Re: Newsgroup for make. (Erik Max Francis)
  Re: Debuger (Zirong Wang)
  Video Software problem ("Federica Ferretti")

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

From: [EMAIL PROTECTED]
Subject: Oops in bottom half
Date: Mon, 05 Jun 2000 16:40:41 GMT



I'm developing a modular driver that uses PCI interrupts. The interrupt
handler simply clears the interrupt at the hardware, then calls
queue_task for my bottom half, and mark_bh(TQ_IMMEDIATE).

My BH is getting called, because printks show up. However, system
stability goes out the window shortly after I install my driver:
typically within 10s I get a swapper "Oops" message. If I don't call
queue_task and mark_bh, stability is that of the linux we know and
love :-).

The Oops occurs even when the BH function has an empty body.

I would be very grateful for any suggestions as to what might be
causing this; having studied other char drivers it appears to me that I
am doing exactly the same thing as them (and as Rubini's book).

TIA

alan



Sent via Deja.com http://www.deja.com/
Before you buy.

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

From: [EMAIL PROTECTED]
Crossposted-To: comp.os.linux.development.apps,comp.os.linux.misc
Subject: Re: Where to get Java Compiler
Date: 3 Jun 2000 13:39:05 -0700

 
I seem to have read somewhere that the blackdown version of JDK
supports native threads (i.e. kernel threads), but I do not think
the Sun Linux JDK does that yet. I think Sun JDK 1.3 for Linux which
will be comming out soon will do that.

So, for threaded applications, you might get a little better
performance using the blackdown JDK.

I also remember reading that they will combine those JDK's into
one common linux JDK, or at least have one common source tree
where Sun/Java and Blackdown engineers will work from.  

Java on Linux is looking better all the time. Good for Java and
Linux.

Nasser


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

From: [EMAIL PROTECTED]
Subject: Re: Oops in bottom half
Date: Mon, 05 Jun 2000 17:08:20 GMT

I wrote:

> ... I get a swapper "Oops" message...

Oops indeed -- mea culpa: tq_structs become owned, not copied, by the
kernel during queue_task(). I was letting it go out of scope, hence
swapper panicked in do_bottom_half.

As often, formulating and asking the question provides instant
enlightenment to a problem that had been bugging me for some time. Some
kind of Zen at work I'm sure.

al



Sent via Deja.com http://www.deja.com/
Before you buy.

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

From: "Dave" <[EMAIL PROTECTED]>
Subject: Hisax Problem
Date: Mon, 5 Jun 2000 18:17:48 +0100

Hi i am having trouble with the hisax.o driver.  Every time i run "isdn
system start" it says that hisax.o device is busy, and everytime i try to
unload it with modprobe, it doesn't unload it and stays doing whatever it is
doing.  Please can someone help me, i know my ISDN card is compatible, it is
an Eicon Diva 2.01 PCI.  I am running Mandrake 7.0 with Kernel 2.2.14-15.
Please can someone help me so i can get the benefits of linux on the
internet through ISDN.



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

From: David Wragg <[EMAIL PROTECTED]>
Subject: Re: farjmp and farcall
Date: 05 Jun 2000 19:36:57 +0000

"Benjamin S. Vera-Tudela" <[EMAIL PROTECTED]> writes:
> Hi ... can anybody help me create an assembly macro for gnu gcc to do a
> farjump and a farcall?
> 
> Something like:
> 
> #define farjmp(seg, offset) __asm__ __volatile__("jmpl %0, %1", seg,
> offset);
> 
> (this one actually doesn't work, that's why I need help)

Try "ljmp" instead of "jmpl".

Whenever I don't know the gas mnemonic for an x86 instruction, I look
up the opcode in an x86 assembly guide, make a single line assembly
file using ".byte" and the opcode, run it through gas, then
disassemble the result with objdump. E.g., finding that the opcode for
the instruction you want is 0xea, I assembled then disassembled this:

.byte 0xea, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06


David Wragg

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

From: "Norman Black" <[EMAIL PROTECTED]>
Subject: Re: posix threads
Date: Mon, 5 Jun 2000 13:33:32 -0700
Reply-To: "Norman Black" <[EMAIL PROTECTED]>

glibc does not implement threads, LinuxThreads (libpthread.so) does.
LinuxThreads does not schedule threads, the kernel does.

--
Norman Black
Stony Brook Software
the reply, fubar => ix.netcom

"Pankaj Ratan Lal" <[EMAIL PROTECTED]> wrote in message
news:w3b_4.220$[EMAIL PROTECTED]...
>
> where can I find the source for the thread scheduling algorithms in the
> glibc. I am working on a project on thread scheduling and I would like to
> experiment with them. Any help here is welcome.
>
> Thanks
> Pankaj Ratan Lal
>
>



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

From: Tom Roberts <[EMAIL PROTECTED]>
Subject: HELP: Linux Net Driver confusions
Date: Mon, 05 Jun 2000 15:47:25 -0500

I am trying to write a network driver for Red Hat Linux 6.2, which
has kernel version 2.2.14-5.0. The basic problem is that Rubini's
book _Linux_Device_Drivers_ only covers the 2.1 kernel, and there 
have been significant changes since then.

In particular, I am trying to use non-ethernet headers, and cannot
get the kernel to deliver a ping packet (ICMP protocol) back to the
ping program even though the driver delivers the packets OK. BUT -- 
essentially the same driver does seem to work on PowerPC linux....

        My host is a Pentium 166 running RH LINUX, kernel 2.2.14-5.0.
        My board is a PowerPC running kernel 2.2.15-2.9.0. This is
        a custom board booted from the host via my SIO driver (which 
        is also its console) -- the board executes our proprietary
        OS just fine so its hardware is OK, and it seems to boot 
        Linux OK (finally!). It has my SIO console driver, an initrd
        ramdisk, and my lspsnet network driver (all compiled as part 
        of the kernel, and both drivers printk their "I'm started"
        messages). Both my SIO and network drivers use memory
        buffers on the board to transfer data; they scan using kernel
        timers and have no interrupts (they will come later).

My net drivers are called "lspsnet" on both host and board, and I
printk the first 3 packets both receive and transmit.

On the board I do:
        ifconfig lspsnet 192.168.0.2 up
        ifconfig lspsnet 
        [... prints out correctly]
        route
        [... prints out correctly]
On the host I do:
        ifconfig lspsnet 192.168.0.1 up
        ifconfig lspsnet 
        [... prints out correctly]
        route
        [... prints out correctly]
        ping -c 1 192.168.0.2           # ping the board once

On the host I see a transmitted packet and a received packet, and
on the board I see a received packet and a transmitted packet (as 
expected). And the returned packet has the IP addresses interchanged
in the IP header (also as expected). It sure looks like the ICMP
protocol on the board returned the packet properly (but I don't know
how to inspect the ICMP packet). "netstat -s" on the board shows the 
correct number of messages received, sent, and echo requests and 
replies in its ICMP section.

But the ping on the host never receives this packet. And "netstat -s"
on the host is not counting the ICMP packets from the ping on the host,
NEITHER SENT NOR RECEIVED -- which is strange. But "ifconfig lspsnet" 
does count the packets transmitted and received (and also I see their 
printk-s). If I ping a host on a real ethernet, "netstat -s" reports
its packets as ICMP messages received and as echo replies, but not as
sent messages or echo requests.

        On the board ping does not work, saying "unknown protocol icmp."
        even though /etc/protocols has ICMP in there. I seem to have
        a library inconsistenty on the board -- I compiled ifconfig and
        netstat with --static to get them to work; my initrd ramdisk is 
        now almost full and I have only an old ping on it....

Does anybody have a clue why the host is not delivering the ping packets
properly? In general, is there any documentation on how to write a net
driver for the 2.2 kernel? Especially non-ethernet headers? Any 
suggestions?


Tom Roberts     [EMAIL PROTECTED]

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

From: Jerry Alexander <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development,comp.os.linux.development.apps
Subject: Linux NFS
Date: Mon, 05 Jun 2000 17:00:13 -0500


Have the following problem.

When compiling under a Clearcase NFS mounted directory,  I get fatal
errors on the link phase.  

If I delete the *.o files causing the linker to crash and do a
umount/mount,
then the make runs fine.

This does not happen when the same files are compiled under a local
directory.

I have only seen this happen with "Clearcase(VOB)" files to date.

Has anyone seen this problem and do they know a fix?   

                                Thanks,

                                        Jerry

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

From: "Norman Black" <[EMAIL PROTECTED]>
Subject: Re: Increase the priority of a thread... how?
Date: Mon, 5 Jun 2000 17:16:32 -0700
Reply-To: "Norman Black" <[EMAIL PROTECTED]>

> > Applications start as SCHED_OTHER. In Linux if you look at the min and
max
> > values for priorities for SCHED_OTHER threads you see that (min = 0) and
> > (max = 0). Other Unix systems may differ. I believe that only super user
> > processes can be real time processes, therefore the super user priority
> > change restriction.
>
> !!! No! What do you think nice(1) does?

sched_get_priority_min, and sched_get_priority_max return 0 and 0
respectively for SCHED_OTHER. Hence my statement of no priority for
SCHED_OTHER.

SCHED_RR and SCHED_FIFO return 1 and 99 for min and max.

Nice can certainly clip resulting priority values to the valid range for a
given scheduling algorithm. Given that min and max both return 0 for OTHER
all adjustments always go outside the defined priority range for OTHER and
may be clipped.

--
Norman Black
Stony Brook Software
the reply, fubar => ix.netcom

"Nix" <$}xinix{[email protected]> wrote in message
news:[EMAIL PROTECTED]...
> "Norman Black" <[EMAIL PROTECTED]> writes:
>
> > In Linux only real time threads (SCHED_RR, SCHED_FIFO) have a priority.
>
> No. All tasks do, even SCHED_OTHER ones.
>
> > Applications start as SCHED_OTHER. In Linux if you look at the min and
max
> > values for priorities for SCHED_OTHER threads you see that (min = 0) and
> > (max = 0). Other Unix systems may differ. I believe that only super user
> > processes can be real time processes, therefore the super user priority
> > change restriction.
>
> !!! No! What do you think nice(1) does?
>
> Only the superuser may raise the priority of a task; mere plebs may only
> lower it. (This is to stop plebs starving other plebs of resources;
> they're selfish buggers, you know.)
>
> > Be careful of real time threads since they can starve all other threads
in
> > the system of CPU time. Most of the kernel threads are running as
>
> The problem is worse than that. Think `priority inversion'.
>
> --
> `It's as if Hal Clement expanded fragments of a novel
>  by H.P. Lovecraft.' --- Jake Kesinger on the novel _Darwinia_.



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

From: "Jun Chen" <[EMAIL PROTECTED]>
Subject: Debuger
Date: Mon, 5 Jun 2000 20:23:50 -0400

Hi buddies,

   Did any one can tell me a handy debuger under linux red-hat?
   Thanks

   Jun Chen



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

From: [EMAIL PROTECTED] (David T. Blake)
Crossposted-To: comp.os.linux.development,comp.os.linux.development.apps
Subject: Re: Linux NFS
Date: 6 Jun 2000 00:18:19 GMT
Reply-To: [EMAIL PROTECTED]

Jerry Alexander <[EMAIL PROTECTED]> wrote:
> 
> Have the following problem.
> 
> When compiling under a Clearcase NFS mounted directory,  I get fatal
> errors on the link phase.  

Go to http://www.sourceforge.net
Search on nfs. 

You should go to the resulting homepage, and follow directions
for building a 2.2.14/15 kernel with appropriate nfs patches.
And you should be in the clear. I think. It was not clear what
NFS server and client you were running from your post (kernel
version, patches...)

-- 
Dave Blake
[EMAIL PROTECTED]

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

From: "XuYifeng" <[EMAIL PROTECTED]>
Subject: Linux IPC costs too much time
Date: Tue, 6 Jun 2000 09:46:51 +0800

Hi,

I am using fast-cgi for my website, my website is very busy, I just found in
my system,
Linux kernel costs too much time, while user time is good, my machine is
Dell PowerEdge
4300 SMP, 512M RAM, 36G RAID5, is Linux IPC slow?

$vmstat 1 10
   procs                      memory    swap          io     system
cpu
 r  b  w   swpd   free   buff  cache  si  so    bi    bo   in    cs  us  sy
id
 9  0  0   1020   5156  75092 116848   0   0     1     0    3     1   4   1
1
 4  0  0   1020   4360  74752 117260   0   0   145    48 7952 50140  25  74
0
 5  0  0   1020   4260  74512 117132   0   0     5   299 6609 37970  26  74
0
 7  1  1   1020   4120  74312 117096   0   0    43   699 6846 36538  27  72
1
 5  0  0   1020   4700  74328 117516   0   0   101     0 3152 16698  29  70
2
 2  0  0   1020   3400  73884 117552   0   0    90    62 4956 27398  26  71
3
 7  0  0   1020   4676  73896 117848   0   0    74     2 5210 28012  32  66
2
 2  2  0   1020   5460  72760 117436   0   0    93   208 5482 32054  27  72
0
 3  0  0   1020   6644  72768 117552   0   0    31     0 5576 33190  29  71
0
11  0  0   1020   6104  72784 117608   0   0    18     2 6247 33894  29  69
2

Regards
XuYifeng




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

From: Brian J Luczkiewicz <[EMAIL PROTECTED]>
Subject: os dev under linux
Date: Mon, 05 Jun 2000 22:18:15 -0400

...If this post is completely off topic for this newsgroup, please don't
flame me, ignore it...

ok. I am interested in starting some simple operating system
development. Open source, of course. I don't know exactly what I will
end up with, but I think it best to start hacking somewhere and see
where it takes you. Namely, I think starting at a bootstrapper would be
a good idea.

Believe it or not, I once photocopied and bound every issue of the
"Firmware Furnace" Column of circuit cellar (Where it talks about
embedded 386 os develpoment). Unfortunately, althought the topic is
good, It's all in MASM and a commercial C compiler that I don't have
access to. This includes a COM file loader and other goodies (in MASM,
of course...)...

Well, now for my question. How could I get started on OS development
using Linux as a development platform. It is preferable if I could use
some sort of a virtual machine or something so I wouldn't need to put
together a testbed, but I could if I had to (I have the parts..just not
the space for another monitor, keyboard, and mouse)....What tools should
I use, how would I compile?....Is there any information on this, maybe
(gasp!) a HOWTO?.....I am fairly experienced in linux C programming,
Linux Assembler Programming, DOS Assembler, and a sprinkling of other
languages, although I ahve a feeling those will be the most useful. Has
anyone done this? I think I saw somewhat of a tutorial once, but it
didn't work or something...I'm open to suggestions though....

Thank you

Brian



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

Subject: Re: RS-485
From: Clayton Haapala <[EMAIL PROTECTED]>
Date: Tue, 06 Jun 2000 03:43:27 GMT

grant@nowhere. (Grant Edwards) writes:

> In article <[EMAIL PROTECTED]>, Tobias Anderberg wrote:
> 
> >I'm about to add support for rs-485 for a project I'm working
> >on. I don't want to make this a user-space driver, instead I
> >would like to add this directly to the existing serial driver,
> >and make it easy accesible with an ioctl(), like "ioctl(fd,
> >RS485, &n);" and then all communication with the serial device
> >would be done using rs-485 semantics.
> 
> RS-485 specifies voltage levels etc.  It has nothing to do with
> software except for the possible need to manually control the
> "direction" of the line driver/receiver by toggling RTS.
> 

Yeah -- what is it +- 13 volts rather than +- 5?  Much better to snake
RS-485 cables around the DC Arc welder in the shop...

When I last dealt with RS-485, back in the misty dawn of time, we had ISA
serial cards that looked to the PC just like their RS-232 cousins, so there
were no software differences that I had to deal with.  It could be, though,
that there were RS-485 features I just didn't know about, or didn't need
to use.
-- 
Clay Haapala      "Woe to he who fears change more than disaster!  For
[EMAIL PROTECTED]  how can he then avoid disaster?"  -- from "the Firebugs"

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

From: [EMAIL PROTECTED] (Timothy Murphy)
Crossposted-To: comp.os.linux.development.apps,comp.os.linux.misc
Subject: Re: Where to get Java Compiler
Date: 5 Jun 2000 23:23:05 +0100

[EMAIL PROTECTED] writes:

>I seem to have read somewhere that the blackdown version of JDK
>supports native threads (i.e. kernel threads), but I do not think
>the Sun Linux JDK does that yet. I think Sun JDK 1.3 for Linux which
>will be comming out soon will do that.

May be worth noting that IBM have a port of JDK-1.3 --
you can find a pointer to it at http://www.alphaworks.ibm.com/ .


-- 
Timothy Murphy  
e-mail: [EMAIL PROTECTED]
tel: 086-233 6090
s-mail: School of Mathematics, Trinity College, Dublin 2, Ireland

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

From: [EMAIL PROTECTED] (Thaddeus L Olczyk)
Subject: Newsgroup for make.
Date: Tue, 06 Jun 2000 06:42:00 GMT
Reply-To: [EMAIL PROTECTED]

Does anyone know what newsgroup you are supposed to use for 
the "make" utility?

There are some questions that I would like answered.
( In particular, is there a technique like:

#ifdef DEBUG
LIB = debug.a
#else
LIB= runtime.a
#endif

for makefiles?
)

If there is anyone that can answer that question great, but i would
still like top know a generic make newsgroup.

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

From: Erik Max Francis <[EMAIL PROTECTED]>
Subject: Re: Newsgroup for make.
Date: Tue, 06 Jun 2000 00:01:24 -0700

Thaddeus L Olczyk wrote:

> Does anyone know what newsgroup you are supposed to use for
> the "make" utility?

comp.unix.programmer or comp.unix.questions would probably be the
typical place.

> There are some questions that I would like answered.
> ( In particular, is there a technique like:
> 
> #ifdef DEBUG
> LIB = debug.a
> #else
> LIB= runtime.a
> #endif
> 
> for makefiles?
> )

GNU make supports conditionals.  Type info make, and navigate to the
"Conditionals" node, which contains syntax and examples.

-- 
 Erik Max Francis / [EMAIL PROTECTED] / http://www.alcyone.com/max/
 __ San Jose, CA, US / 37 20 N 121 53 W / ICQ16063900 / &tSftDotIotE
/  \ If you don't take chances, you can't do anything in life.
\__/ Michael Spinks
    Fat Boy and Little Man / http://www.fatboyandlittleman.com/
 Watch Fat Boy and Little Man go about their antics.

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

From: Zirong Wang <[EMAIL PROTECTED]>
Subject: Re: Debuger
Date: Tue, 06 Jun 2000 09:28:47 +0200

Jun Chen wrote:

>    Did any one can tell me a handy debuger under linux red-hat?
>    Thanks
> 

gdb,
xxgdb

=====================================================================
Zirong Wang    Oce Industries  1, Rue J. Lemoine 94015 Creteil France

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

From: "Federica Ferretti" <[EMAIL PROTECTED]>
Subject: Video Software problem
Date: Tue, 6 Jun 2000 09:56:48 +0200

Hi to all,
I've RedHat 6.1 with a cam.
I've successfully installed the videodev module and V4L2 driver.

I haven't found a software capable to aquire from command line, something
like:

'commandline-command-to-start-aquire dest-filename' and
'commandline-command-to-stop-aquire dest-filename'


Can you help me to find a software or something like this description?


Thank you very much,
  --Federica.







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


** 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