Linux-Development-Sys Digest #86, Volume #8      Fri, 18 Aug 00 19:13:09 EDT

Contents:
  Re: debugging/profiling multithreaded (pthread) applications on RedHat 6.x? 
(Szabolcs Csetey)
  Re: Linux Driver Tools (Nix)
  ifconfig: device not found??? (Jerome Corre)
  Re: Linux Driver Tools (Josef Moellers)
  Re: ifconfig: device not found??? ("Jan Welti")
  Re: Circumventing TIME_WAIT...howto? (Rick Ellis)
  Re: all threads in a process share the same pid? (Alexander Viro)
  Re: all threads in a process share the same pid? ([EMAIL PROTECTED])
  Re: all threads in a process share the same pid? (Alexander Viro)
  CVS commit problems (Kevin Kaichuan He)
  Re: all threads in a process share the same pid? (Kaz Kylheku)
  Re: task queue (Kaz Kylheku)
  how to see large prinouts from the kernel ("Randy Lexvold")
  Re: how to see large prinouts from the kernel (Kaz Kylheku)
  Re: colour map (The Ghost In The Machine)
  Re: all threads in a process share the same pid? ([EMAIL PROTECTED])
  self wake up sleep in ther kernel ("Peter Huang")
  does linux kernel support POSIX_aio ("benjamin grant")
  Can't use both USB printer and Promise Ultra66 at the same time (Jonathan Kamens)

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

From: Szabolcs Csetey <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: Re: debugging/profiling multithreaded (pthread) applications on RedHat 6.x?
Date: Fri, 18 Aug 2000 14:27:02 GMT

In article <[EMAIL PROTECTED]>,
  [EMAIL PROTECTED] wrote:
> On Thu, 17 Aug 2000 19:19:08 GMT, Szabolcs Csetey <[EMAIL PROTECTED]>
wrote:
> >AFAIK gprof doesn't support multithreaded apps profiling, but you can
> >workaround it if you call getitimer() in the main thread for
ITIMER_PROF
> >then using that value in a call to setitimer() in every thread you
> >spawn. Other alternative is using the open source cprof by Corel [I
> >never had the chance to try it out yet]:
>
> Profiling in Linux is not based on the profiling alarm timer. It is
based on
> a special profiling system call.

I've never heard about this, what system call, what kernel?
Multithreaded apps profiling works for me as I wrote above with 2.2.x
kernels + glibc-2.[01].

> Now in glibc 2.0 it was possible to call moncontrol(1) from a thread
to turn
> on profiling for that thread.

Tried, this works as well (same profile results).

> >Please also note coredumping multithreaded apps in 2.2 kernels aren't
> >reliable [should be ok in 2.4] - the kernel dumps just one thread and
> >usually not the one that really crashed. Workaround is if you run it
> >from gdb or apply this one-liner patch:
> >http://www.cs.helsinki.fi/linux/linux-kernel/2000-11/0896.html
>
> I use a two liner patch which causes each thread (other than the
> thread manager, which terminates via _exit(0)) to generate a core
file.
> Each core file is named "core.<pid>".

While this is still much better than the current non-existent kernel
support I found it also as inefficient as the above one. I prefer the
1st one since it can't fill up my disk and dumps only the guilty thread
(no need to look through all of them although adding some extra lines in
the patch could be a workaround). The real solution would be to dump all
threads in the same core file ... just as Solaris does.



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

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

From: Nix <$}xinix{[email protected]>
Subject: Re: Linux Driver Tools
Date: 18 Aug 2000 07:44:35 +0100

[EMAIL PROTECTED] (Amir Inbar) writes:

> August 1st, 2000 (Jungo, Israel): Jungo announced today the release of
> WinDriver and KernelDriver version 5.0 - the new generation of driver
> development tools. Version 5.0 of Jungo development tools includes
> major enhancements and features, among them a multi platform Wizard,
> bringing a comprehensive driver development environment for Linux
> driver developers, a new KernelDriver Wizard that generates code for a
> complete kernel mode driver and remote hardware access tool. 

If this is an attempt to have one set of tools produce Windows and Linux
drivers, well... a hiding to nothing, or at least truly *appalling*
code. Machine-generated code is all very well, but not if it emits code
in a place where normally human-generated code is emitted; humans have
higher standards of code quality than machines.

-- 
`OS's and GUI's come and go, only Emacs has lasting power.' --- Per Abrahamsen

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

From: Jerome Corre <[EMAIL PROTECTED]>
Subject: ifconfig: device not found???
Date: Fri, 18 Aug 2000 14:42:55 GMT

 hi

I am trying to make a samll linux version (for fun and to get a better
understanding of linux).
So far it boot, mount the root on a ram disk and give a loggin.
I am trying to set up some networking, however when i run the command:
'ifconfig eth0' in my init script i get :
device not found

What does ifconfig do when its run, what does it look for. what did i
forget on my small linux version that ifconfig needs?

any help, pointer to good documentation is welcome:
I have tryed the howtos, man and strace on ifconfig but i haven't been
able to figure out what's wrong

thanks in advance

Jerome



--
Jerome Corre


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

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

From: Josef Moellers <[EMAIL PROTECTED]>
Subject: Re: Linux Driver Tools
Date: Fri, 18 Aug 2000 17:02:36 +0200

Nix wrote:

> If this is an attempt to have one set of tools produce Windows and Linu=
x
> drivers, well... a hiding to nothing, or at least truly *appalling*
> code. Machine-generated code is all very well, but not if it emits code=

> in a place where normally human-generated code is emitted; humans have
> higher standards of code quality than machines.

It may very well be a combiantion of both: human generated code to
handle driver internal data structures and machine generated code to
handle the interface between driver and OS proper. Much like lex and
yacc generate compilers: stinging together the human generated code.

-- =

Josef M=F6llers (Pinguinpfleger bei FSC)

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

From: "Jan Welti" <[EMAIL PROTECTED]>
Subject: Re: ifconfig: device not found???
Date: Fri, 18 Aug 2000 18:12:53 +0300

It didn't find eth0, that's probably because there is no /dev/eth0

--
The Rules Have Changed...Get Paid to Surf the Web!
http://www.alladvantage.com/go.asp?refid=IRU461
"Jerome Corre" <[EMAIL PROTECTED]> wrote in message
news:8nji1a$u8g$[EMAIL PROTECTED]...
> hi
>
> I am trying to make a samll linux version (for fun and to get a better
> understanding of linux).
> So far it boot, mount the root on a ram disk and give a loggin.
> I am trying to set up some networking, however when i run the command:
> 'ifconfig eth0' in my init script i get :
> device not found
>
> What does ifconfig do when its run, what does it look for. what did i
> forget on my small linux version that ifconfig needs?
>
> any help, pointer to good documentation is welcome:
> I have tryed the howtos, man and strace on ifconfig but i haven't been
> able to figure out what's wrong
>
> thanks in advance
>
> Jerome
>
>
>
> --
> Jerome Corre
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.



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

From: [EMAIL PROTECTED] (Rick Ellis)
Subject: Re: Circumventing TIME_WAIT...howto?
Date: 18 Aug 2000 15:42:48 GMT

In article <[EMAIL PROTECTED]>,
Robert Colbert  <[EMAIL PROTECTED]> wrote:

>So, given that our full-duplex, switched, routed dual-VLAN internal,
>isolated 12 Gigabit network of 96 PCs and a few controller PCs does not drop
>packets and no packet takes longer than about 2ms to reach its destination,
>yep, I'm very positive that I don't need a two-minute TIME_WAIT clog in this
>environment. And, UDP doesn't do "session" traffic (or even use the right
>protocol for what we're testing).

So what exactly are you complaining about?  If it's that you can't bind
to the port, you need to set SO_REUSEADDR.

--
http://www.fnet.net/~ellis/photo/linux.html

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

From: [EMAIL PROTECTED] (Alexander Viro)
Crossposted-To: comp.os.linux.development.apps
Subject: Re: all threads in a process share the same pid?
Date: 18 Aug 2000 12:02:35 -0400

In article <[EMAIL PROTECTED]>,
David Wragg  <[EMAIL PROTECTED]> wrote:
>[EMAIL PROTECTED] (Linus Torvalds) writes:
>> Easily fixed:
>> 
>> [snip getpid() implementation] 
>> 
>> .. and pthread_create() needs to do a "getpid()" call to make
>>    sure that the pid cache is primed. "fork()" needs to clear
>>    the cached pid etc ..
>> 
>> If the pthreads library doesn't do this already, then it should.
>
>And if we're going to have such a lousy implementation of POSIX
>threads, then why implement it at all.

"If POSIX threads are a good thing, perhaps I don't want to know what
they're better than."                                   -- Rob Pike

-- 
"You're one of those condescending Unix computer users!"
"Here's a nickel, kid.  Get yourself a better computer" - Dilbert.

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

From: [EMAIL PROTECTED]
Subject: Re: all threads in a process share the same pid?
Crossposted-To: comp.os.linux.development.apps
Date: Fri, 18 Aug 2000 16:08:03 GMT

In comp.os.linux.development.apps Alexander Viro <[EMAIL PROTECTED]> wrote:
> "If POSIX threads are a good thing, perhaps I don't want to know what
> they're better than."                                 -- Rob Pike

Personally, I find it somewhat amusing that a project which originally
gathered so much support due to its impementation of standards has
been passed up in that department by the original do it yourself job,
BSD.

-- 
Matt Gauthier <[EMAIL PROTECTED]>

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

From: [EMAIL PROTECTED] (Alexander Viro)
Crossposted-To: comp.os.linux.development.apps
Subject: Re: all threads in a process share the same pid?
Date: 18 Aug 2000 12:22:36 -0400

In article <Dbdn5.34186$[EMAIL PROTECTED]>,
 <[EMAIL PROTECTED]> wrote:
>In comp.os.linux.development.apps Alexander Viro <[EMAIL PROTECTED]> wrote:
>> "If POSIX threads are a good thing, perhaps I don't want to know what
>> they're better than."                                        -- Rob Pike
>
>Personally, I find it somewhat amusing that a project which originally
>gathered so much support due to its impementation of standards has
>been passed up in that department by the original do it yourself job,
>BSD.

Hey, it were BSD folks who bothered implementing OSI stack - we didn't touch
that shit, standards or not. IOW, there are standards and there are braindead
standards.  And POSIX is gradually moving into the second cathegory - they
are going from codifying the existing practice to committee-driven inventing
of stillborn APIs...

-- 
"You're one of those condescending Unix computer users!"
"Here's a nickel, kid.  Get yourself a better computer" - Dilbert.

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

From: Kevin Kaichuan He <[EMAIL PROTECTED]>
Subject: CVS commit problems
Date: Fri, 18 Aug 2000 09:33:02 -0700

        Hi, recently I found a problem when I tried to commit CVS source
tree as root. I first use "cvs checkout <proj_name>", and then modify
some files, then when I typed "cvs commit", it displays:

cvs [commit aborted]: cannot commit files as 'root' 

        Is it saying we cann't check in cvs source files as root ? (the
repository is in local machine)


Thanks in advance,

kevin



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

From: [EMAIL PROTECTED] (Kaz Kylheku)
Crossposted-To: comp.os.linux.development.apps
Subject: Re: all threads in a process share the same pid?
Reply-To: [EMAIL PROTECTED]
Date: Fri, 18 Aug 2000 17:41:28 GMT

On 18 Aug 2000 12:22:36 -0400, Alexander Viro <[EMAIL PROTECTED]> wrote:
>Hey, it were BSD folks who bothered implementing OSI stack - we didn't touch
>that shit, standards or not. IOW, there are standards and there are braindead
>standards.  And POSIX is gradually moving into the second cathegory - they
>are going from codifying the existing practice to committee-driven inventing
>of stillborn APIs...

You are dead on in this observation. POSIX is definitely suffering from the
``second system effect'' described by Fred Brooks.

Here is an example: now you have the function pthread_mutex_timedwait to do a
timed-out wait on a mutex.  Talk about useless!  

The stuffed so much crap into mutexes that now they invented a whole new
lower-level locking interface: pthread_spinlock_t.

It's quite irritating.

-- 
Any hyperlinks appearing in this article were inserted by the unscrupulous
operators of a Usenet-to-web gateway, without obtaining the proper permission
of the author, who does not endorse any of the linked-to products or services.

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

From: [EMAIL PROTECTED] (Kaz Kylheku)
Subject: Re: task queue
Reply-To: [EMAIL PROTECTED]
Date: Fri, 18 Aug 2000 17:52:18 GMT

On Thu, 17 Aug 2000 21:18:34 -0700, Peter Huang <[EMAIL PROTECTED]> wrote:
>
>Hi all
>
>How do I distinuish whether the task queue is running in the interrupt time
>or in the regular time?

It used to be that you could examine the value of intr_count. If it is zero,
then you are in ``regular time'', but that is gone.

The real answer is that your code should not worry about it. Code run as a
bottom half task should always assume that it is in an interrupt.  It should
not try to detect that it's in process context or do anything special.

Hacks like that remind me of the ``technique'' of an MS-DOS TSR performing
checks to see whether DOS was interrupted, to see whether it is safe to
call into it. Gack!

-- 
Any hyperlinks appearing in this article were inserted by the unscrupulous
operators of a Usenet-to-web gateway, without obtaining the proper permission
of the author, who does not endorse any of the linked-to products or services.

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

From: "Randy Lexvold" <[EMAIL PROTECTED]>
Subject: how to see large prinouts from the kernel
Date: Fri, 18 Aug 2000 18:53:27 GMT

Hello,
I am developing a hardware driver with RedHat Linux.  From the driver code,
I call the function printk() to print debug info.  I have 2 choices:

1.  Without the startx Linux GUI:  I have just one Linux screen with a
prompt.  When I start the debugged driver, it quickly overflows the screen
with debug messages, and then I can't see them all.  I also could not find a
way to redirect the messages to a file so I can see them all.

2.  With the GUI, I can have a terminal window with a prompt.  However,
there no messages printed with printk() from the kernel show up.


So, how can I see large amounts of printk() output in Linux?

Thank you very much,

Mark Galecki



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

From: [EMAIL PROTECTED] (Kaz Kylheku)
Subject: Re: how to see large prinouts from the kernel
Reply-To: [EMAIL PROTECTED]
Date: Fri, 18 Aug 2000 18:59:12 GMT

On Fri, 18 Aug 2000 18:53:27 GMT, Randy Lexvold <[EMAIL PROTECTED]> wrote:
>Hello,
>I am developing a hardware driver with RedHat Linux.  From the driver code,
>I call the function printk() to print debug info.  I have 2 choices:
>
>1.  Without the startx Linux GUI:  I have just one Linux screen with a
>prompt.  When I start the debugged driver, it quickly overflows the screen
>with debug messages, and then I can't see them all.  I also could not find a
>way to redirect the messages to a file so I can see them all.

man syslog.conf

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

From: [EMAIL PROTECTED] (The Ghost In The Machine)
Crossposted-To: comp.os.linux.development.apps
Subject: Re: colour map
Date: Fri, 18 Aug 2000 20:36:28 GMT

In comp.os.linux.development.apps, Gee
<[EMAIL PROTECTED]>
 wrote
on Thu, 17 Aug 2000 12:42:39 -0400
<[EMAIL PROTECTED]>:
>Hi, I'm trying to allocate some custom colours into the colour map,
>using the BX command XParseColor()  but it's not letting me.
>
>does anyone know if linux allows you to insert custom colours??

XParseColor doesn't allocate a color in the map; it merely parses it.
Try XAllocNamedColor if you know it's a name (e.g., "red"), or
XParseColor folowed by XAllocColor.

'man XParseColor' for more details.

>
>thanks
>
>Gee
>

-- 
[EMAIL PROTECTED] -- insert random misquote here

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

From: [EMAIL PROTECTED]
Subject: Re: all threads in a process share the same pid?
Crossposted-To: comp.os.linux.development.apps
Date: Fri, 18 Aug 2000 21:10:16 GMT

In comp.os.linux.development.apps Kaz Kylheku <[EMAIL PROTECTED]> wrote:
> It's quite irritating.

On the other hand, having your software compile and run on every *nix
variant except Linux is more irritating.

-- 
Matt Gauthier <[EMAIL PROTECTED]>

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

From: "Peter Huang" <[EMAIL PROTECTED]>
Subject: self wake up sleep in ther kernel
Date: Fri, 18 Aug 2000 14:25:48 -0700


Hi all

I am looking for a sleep function that can wake up after it sleep for a
period of time
by the kernel. I'm not sure how to implement  it with interruptible_sleep_on
or sleep_on
since both functions wait on a wait queue. I'm looking for a function that
is similar to

    sleep(20ms)..

Peter



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

From: "benjamin grant" <[EMAIL PROTECTED]>
Subject: does linux kernel support POSIX_aio
Date: Fri, 18 Aug 2000 13:34:51 +0800

windows kernel can support Async IO,when read or write aviliable , threads
can get sig from message queue.
does linux can do this?



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

From: [EMAIL PROTECTED] (Jonathan Kamens)
Crossposted-To: alt.comp.periphs.mainboard.supermicro
Subject: Can't use both USB printer and Promise Ultra66 at the same time
Date: 18 Aug 2000 22:48:33 GMT

I'm using linux 2.2.16 with usb-2.4.0-test2-pre2-for-2.2.16-v3 and
ide.2.2.16.all.20000805 patches applied.  I have a SuperMicro S2DGU
motherboard.  Its got a PIIX4 USB chipset.

I just got a Canon BJC-2100 printer, which has a USB port.  I'm trying
to use both it and my Promise Ultra66 controller at the same time.  I
can't.

If I disable USB in my BIOS, the Promise controller works fine, but of
course the USB code can't see my printer.

*f I enable USB in my BIOS and use the standard UHCI USB driver, the
Promise controller works fine, but the USB driver doesn't see my
printer.

If I enable USB in my BIOS and use the JE UHCI USB driver, the USB
driver sees my printer but then the Promise controller doesn't work --
I get the error "ide2: ports already in use, skipping probe" and the
same thing for "ide3".

I've tried moving the Promise controller to a different slot.  I've
tried assigning it a different IRQ explicitly in the BIOS (that seems
to have no effect).  I don't know what else to try.

I've put the output of "dmesg", "cat /proc/interrupts", "cat
/proc/ioports", and "cat /proc/pci" up on my home page so that anyone
who might be able to help me solve this problem can look at them
without cluttering up the Usenet with all that data.

USB disabled:

<URL:http://www.mit.edu/~jik/nousb/dmesg.txt>
<URL:http://www.mit.edu/~jik/nousb/interrupts.txt>
<URL:http://www.mit.edu/~jik/nousb/ioports.txt>
<URL:http://www.mit.edu/~jik/nousb/pci.txt>

Standard UHCI USB driver:

<URL:http://www.mit.edu/~jik/usb/dmesg.txt>
<URL:http://www.mit.edu/~jik/usb/interrupts.txt>
<URL:http://www.mit.edu/~jik/usb/ioports.txt>
<URL:http://www.mit.edu/~jik/usb/pci.txt>

JE UHCI USB driver:

<URL:http://www.mit.edu/~jik/jeusb/dmesg.txt>
<URL:http://www.mit.edu/~jik/jeusb/interrupts.txt>
<URL:http://www.mit.edu/~jik/jeusb/ioports.txt>
<URL:http://www.mit.edu/~jik/jeusb/pci.txt>

If you can provide any insight into how I might solve this problem,
I'd be extremely grateful.  If there's any other information I can
provide that would help you, please let me know.

Thanks!

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


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