Linux-Development-Sys Digest #736, Volume #6     Fri, 21 May 99 22:14:05 EDT

Contents:
  Re: mapping user space and kernel space (Nitin Malik)
  Re: Port MS C program to Linux (Erik de Castro Lopo)
  Re: gdb problems on threaded program (Arun Sharma)
  Re: accurate timer - HELP! (Mike McCarty)
  Re: Linux-2.2.8, 2.2.9 and update - What's the story? (Mark Tranchant)
  Re: Can I open files in device driver? (Frank Sweetser)
  Re: never reboot to upgrade ? (Tony Smith)
  Re: Using the parallel-port? ([EMAIL PROTECTED])
  Re: Accurate profiling with Pentium TSC (Nitin Malik)
  Re: 2.2.9 Hangs after a few hours of uptime (bryan)
  Re: mapping user space and kernel space (Frank McGirt)
  Re: __register_frame_info, glibc2.0.6 and Slackware 3.6 (Christopher Strong)
  Re: New Project:  Linux Upgrade Monitor (upgrademon) (Kevin Burton)

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

Date: Fri, 21 May 1999 11:42:11 -0400
From: Nitin Malik <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Subject: Re: mapping user space and kernel space

> 2.0.36 implementation:
>
> 1. in driver reserve buffer by setting RESERVED bit so that
>
> 2. call mmap() from app as:
>
> 3. in driver mmap() implemented as:
>

did you have to change the existing TCP/IP stack when u did this?

--
nitin




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

From: Erik de Castro Lopo <[EMAIL PROTECTED]>
Subject: Re: Port MS C program to Linux
Date: Sat, 22 May 1999 08:22:32 +1000

Kevin Burton wrote:
> 
> None of the Win32 stuff (#include <windows.h>) will work.  I am thinking
> about fixing this.   I know the Win32 API fairly well and sort of think
> it would be cool to develop across OS with the same core API.  I am
> thinking about working with the WINE guys to develop a library for just
> this purpose.  Way off though.

You have just described libwine which is part of Wine :-). Last I looked
at it, it still needed some work.

Erik
-- 
+-------------------------------------------------+
     Erik de Castro Lopo     [EMAIL PROTECTED]
+-------------------------------------------------+
J. Headley: "God, root, what is difference ?"
G. Haverland: "God can change the byte order on the CPU, root can't."

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

From: [EMAIL PROTECTED] (Arun Sharma)
Subject: Re: gdb problems on threaded program
Reply-To: [EMAIL PROTECTED]
Date: Fri, 21 May 1999 15:37:37 GMT

On Fri, 21 May 1999 05:33:48 GMT, Zsolt Zsoldos <[EMAIL PROTECTED]> wrote:
> Hi there,
> 
> I tried to use gdb (directly in CLI as well as from ddd) on a multi-threaded
> program, but I keep running into the following problems:
> 
> 1. If I try to post-mortem debug a core, it starts up with an error message:
>    ../sysdeps/unix/sysv/linux/sigsuspend.c - no such file or directory
> 
> 2. The stack trace comes up in a thread which was sleeping and not the one
>    that caused the crash, and I did not find any way to switch to other thread.
>    E.g. the thread window of ddd shows only this single thread
> 

The core files are getting overwritten. You can enable core files of the
form "core.pid" by uncommenting a line in linux/fs/binfmt*

        -Arun


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

From: [EMAIL PROTECTED] (Mike McCarty)
Crossposted-To: comp.os.linux.hardware,comp.realtime,comp.hardware
Subject: Re: accurate timer - HELP!
Date: 21 May 1999 22:49:35 GMT

In article <[EMAIL PROTECTED]>,
Vladimir G. Stanishev <[EMAIL PROTECTED]> wrote:
)killbill wrote:
)
)> In article <[EMAIL PROTECTED]>,
)>   Dorin-Ioan Marinca <[EMAIL PROTECTED]> wrote:
)>
)> > How can I count the time (*less than 1us* - even x*10ns) very accurate
)> > on Linux? I search something not depended on hardware or, if not,
)> > something Pentium specific.
)
)honnestly I doubt that you'll be able to get to less than 1 microsecond
)resolution.  You may have already found the UTIME

[snip]

On PC hardware, the highest frequency clock which is directly visible to
software (discounting those which a specific processor might provide)
runs at 14.31818MHz/12 = 1.19318 MHz, giving 838 ns resolution.

Mike
-- 
----
char *p="char *p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
This message made from 100% recycled bits.
I don't speak for Alcatel      <- They make me say that.

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

From: Mark Tranchant <[EMAIL PROTECTED]>
Subject: Re: Linux-2.2.8, 2.2.9 and update - What's the story?
Date: Fri, 21 May 1999 16:03:34 +0100
Reply-To: [EMAIL PROTECTED]

Arne K. Haaje wrote:
> 
> But, do we run update under 2.2.9 ?
> 

Yes. I tried it without, and my hard drive fell asleep in the middle of
compiling the kernel!

Mark.

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

From: Frank Sweetser <[EMAIL PROTECTED]>
Subject: Re: Can I open files in device driver?
Date: 21 May 1999 11:31:07 -0400

������ <[EMAIL PROTECTED]> writes:

> I need to open /proc/pci files in device driver which I am developing of
> .
>
> In device driver, can I use  'open()' and 'read()'  function to some
> files?

no

> Or can I read pci data from memory which /proc/pci uses?

linux/Documentation/pci.txt

-- 
Frank Sweetser rasmusin at wpi.edu fsweetser at blee.net  | PGP key available
paramount.ind.wpi.edu RedHat 5.2 kernel 2.2.5        i586 | at public servers
> This made me wonder, suddenly: can telnet be written in perl?
Of course it can be written in Perl.  Now if you'd said nroff,
that would be more challenging...   -- Larry Wall

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

From: Tony Smith <[EMAIL PROTECTED]>
Subject: Re: never reboot to upgrade ?
Date: Fri, 21 May 1999 14:27:19 +0100
Reply-To: [EMAIL PROTECTED]

This is a multi-part message in MIME format.
==============CEF0EDDB257B3A0DAC43F564
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Kevin Burton wrote:

>
> Tony Smith wrote:
> >
> > Mike Rushford wrote:
> >
> > > I have enjoyed the stability of Linux for years and have only had to
> > > shut down my Linux boxes to upgrade the next Kernel version.
> > >
> > > Is there a way of building a kernel so that it takes the place of a
> > > currently running one without ever shutting down?
> > >
> > > Same question for Libraries in memory can we force library upgrades by
> > > just putting the new libs and sym links on disk and then doing something
> > >
> > > like sync and ldconfig to force a relink to the newly installed ones?
> > >
> > > It would be cool to claim linux could be up for ever with only hardware
> > > upgrades forcing a shutdown!
> > >
> > > --
> > > Mike  [EMAIL PROTECTED]  http://www.hooked.net/~tvs/eyes/
> >
> > I doubt very much if you'll ever get a dynamic kernel upgrade on a single
> > machine (e.g. because of the interdependencies that would need to be
> > resolved between the kernel and the modules). What I think you want (and I
> > too would like this) is something akin to what Compaq (ex Tandem) provide
> > with their XC and S4000 products: Single System Image. i.e. Two (or more)
> > machines which look like one machine to all users. i.e. one process table,
> > all shared memory accessible from any node, all disk devices accessible from
> > any node. This allows you to take a node out of the cluster, upgrade it, and
> > plug it back in with zero downtime. Processes can be interrupted and moved
> > to a different node *between* instructions for load balancing or fault
> > tolerance.
> >
> > I don't know what work, if any, is being done on this, but if we get that
> > functionality on Linux, it would make justifications for its use in
> > commercial solutions much easier (currently I am encountering a LOT of
> > resistance to the idea, and this sort of HA clustering would really tip the
> > balance).
> >
> > Can anyone offer further insight into this area of development?
> >
> > Tony
>
> You should be able to do this with IP load balancing and some sort of
> file based (on access) replication.
>
> Would look like this
>
> IPLB:  host.domain.com -> 127.0.0.1 and 127.0.0.2
>
> now if you do an nfsmount it would give you either machine.
>
> There are products that do this but none that I know of for linux.
> Cisco localdirector, Windows Load Balancing service etc do this.
>
> What is needed is an open source version....  hmmm.. this is something I
> might enjoy working on.
>
> Kevin
>

> --
> Kevin A. Burton
> Internet Guy

That may well meet the original posters requirements, but unfortunately
it doesn't
really meet mine, for several reasons. Firstly, it involves using NFS,
and that's
far less than ideal - for performance in this environment, you want the
disk
accesses to be local at least some of the time (ideally 50% or more).
Secondly,
the real objective of an system like this is to be able to divorce your
applications from high availability issues. Your programmers see one
machine, with
shared memory, disks etc. and that's all they have to cope with.
Similarly,
someone running a Single System Image machine sees a much simpler view
of their
environment and so they cope with the complexity much better. Thirdly,
with some
devious engineering, you could make it possible for nodes in the cluster
to come
and go transparently (i.e. all of a nodes processes would migrate to
another node
when it goes down, and processes would be migrated onto new nodes as
soon as they
joined).

I think the only way you can really achieve this aim is (a) to hack
device drivers
so I/O requests for devices or memory regions which are not local are
routed over
some intermediate medium (not Ethernet, but say Memory Channel) and (b)
to hack
the kernel to cope with process migration and to present a single
coherent view of
the running processes.

Tandem's implementation of (a) is seriously good stuff. It's called
ServerNet and
I believe that today it runs at around 50 mega BYTES per second so
there's plenty
of I/O bandwidth between nodes.

It's a bit of a pipe dream, I know, but there is an untapped market for
extremely
highly available Linux based servers, and I can only see this market
growing as
the demands of e-commerce increase.

Tony
==============CEF0EDDB257B3A0DAC43F564
Content-Type: text/x-vcard; charset=us-ascii;
 name="tony.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Tony Smith
Content-Disposition: attachment;
 filename="tony.vcf"

begin:vcard 
n:Smith;Tony
x-mozilla-html:FALSE
adr:;;;;;;
version:2.1
email;internet:[EMAIL PROTECTED]
fn:Tony Smith
end:vcard

==============CEF0EDDB257B3A0DAC43F564==



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

From: [EMAIL PROTECTED]
Crossposted-To: alt.os.linux,alt.uu.comp.os.linux.questions,at.linux
Subject: Re: Using the parallel-port?
Date: Fri, 21 May 1999 23:19:51 GMT

In article <[EMAIL PROTECTED]>,
  Juergen Messerer <[EMAIL PROTECTED]> wrote:
> ....
> Here is my simple program. After the start of this program an error
> occured:
>
> Error in writing to the device: Bad address
>
> ....
>    status=write(filedes,1,(size_t)1);
>
The second argument of write() has to point to the beginning of the
buffer, the contents of which you want to write.

Are you shure you really want to write the one byte that is contained
in the memory location with the absolute address 1?

Regards, Rainer


--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---

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

Date: Fri, 21 May 1999 19:40:28 -0400
From: Nitin Malik <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Subject: Re: Accurate profiling with Pentium TSC


==============DF26096950B00896FB2D0A92
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Hi,

I am having problems printing the value returned by the instruction. I let the runs go 
on for some time and then log them...

It returns an unsigned long long... i tried using "%llu" and "%Lu"... gives me screwed 
up values...

what format specifiers did u use for printing them?

nitin



==============DF26096950B00896FB2D0A92
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>

<PRE>Hi,</PRE>

<PRE>I&nbsp;am having problems printing the value returned by the instruction. 
I&nbsp;let the runs go on for some time and then log them...</PRE>

<PRE>It returns an unsigned long long... i tried using "%llu" and "%Lu"... gives me 
screwed up values...</PRE>

<PRE>what format specifiers did u use for printing them?</PRE>

<PRE></PRE>

<PRE>
nitin</PRE>
&nbsp;</HTML>

==============DF26096950B00896FB2D0A92==


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

From: bryan <[EMAIL PROTECTED]>
Subject: Re: 2.2.9 Hangs after a few hours of uptime
Date: Fri, 21 May 1999 16:42:36 GMT

John Ioannidis <[EMAIL PROTECTED]> wrote:
: I have 2.2.9 running on Pentium II machines (Tyan S1692DL motherboard,
: 256M of ECC SDRAM, 333MHz P-II (id 0x650, stepping 0), 2940UW, generic
: video card, no IDE devices present), and after a few hours of uptime
: they lock up.  No crashes, no diagnostics on the console; they don't
: respond to ctl-alt-del, or to sysreq chords; the only thing that
: brings them back is a hard reset.  I don't recall seeing this behavior
: in 2.2.5, so something must have gone wrong with 2.2.9.  Is anyone
: else experiencing this?  

I'm running 2.2.9 on my public webserver and its been up 4 days with a
moderate amount of hits and no hangs at all.  its a dual cpu system,
fwiw.

-- 
Bryan

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

From: [EMAIL PROTECTED] (Frank McGirt)
Subject: Re: mapping user space and kernel space
Date: Fri, 21 May 1999 17:10:11 GMT

Nitin,

This is not a network application.  I should have given a little more
detail.  The driver is for Bit3 617 PCI/VME interface adapter which
has its own on-board DMA controller.  I need to supply the physical
address of a kernel buffer to the controller and then let it fill the
buffer for me.   I can then copy the buffer to user space through an
ioctl call but to save this copy I want to map the buffer to user
space.

Cannot figure out why the exact same code does not work for 2.2.7 when
it seems rock solid for 2.0.36.   I know the prototype for mmap()
changed but I only used the inode entry to get the minor device number
for multiple 617 support and I now get that from
file->d_entry->i_node, etc.

Mapping kernel buffers to user space is a pretty common thing.  The
thing that makes mine a little different is that I need contiguous
pages because of the dma - hence the use of get_dma_pages instead of
vmalloc.   Must set the reserved bit to use remap_page_range() so I
don't know.....    Sure is frustrating.

Frank




At 11:42 AM 5/21/99 -0400, you wrote:
>> 2.0.36 implementation:
>>
>> 1. in driver reserve buffer by setting RESERVED bit so that
>>
>> 2. call mmap() from app as:
>>
>> 3. in driver mmap() implemented as:
>>
>
>did you have to change the existing TCP/IP stack when u did this?
>
>--
>nitin
>
>
>
On Fri, 21 May 1999 11:42:11 -0400, Nitin Malik
<[EMAIL PROTECTED]> wrote:

>> 2.0.36 implementation:
>>
>> 1. in driver reserve buffer by setting RESERVED bit so that
>>
>> 2. call mmap() from app as:
>>
>> 3. in driver mmap() implemented as:
>>
>
>did you have to change the existing TCP/IP stack when u did this?
>
>--
>nitin
>
>
>


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

From: Christopher Strong <[EMAIL PROTECTED]>
Subject: Re: __register_frame_info, glibc2.0.6 and Slackware 3.6
Date: Fri, 21 May 1999 12:05:14 -0600
Reply-To: [EMAIL PROTECTED]

Mark Tranchant wrote:
> 
> But egcs is gcc now. Cygnus egcs team are the gcc maintainers and the
> compilers will soon be one and the same.
> 
> Slackware does provide gcc-2.7.2.3 as an alternative to egcs-1.0.3.
>
Yeah, I tried that.  But on Slackware 3.6, if I just install gcc,
everything breaks.

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

From: Kevin Burton <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: Re: New Project:  Linux Upgrade Monitor (upgrademon)
Date: Fri, 21 May 1999 18:18:15 -0700

Excellent comments.  


Nelson Minar wrote:
> 
> I think the binary packaging of RPM and Debian is one of the major
> things that distinguishes Linux from other OSes. It's an advantage
> over other Unixes, and it's a major advantage over Windows.
> 
> The one thing missing is simple auto-configuration and upgrading. I
> shouldn't have to know about ftp sites, I shouldn't have to think
> about software upgrades. It should just work. It's a hard problem.
> 
> GnoRPM is the closest thing I've seen.
>   http://www.daa.com.au/~james/gnome/


Totally.  GnoRPM Looks like a step in the right direction.  Looks like
it needs some mroe work.


> 
> Kevin Burton <[EMAIL PROTECTED]> writes:
> > - Autoftp and autorpm are both console tools and I want this to be a
> > GUI.
> 
> You can write a GUI for them easily enough. The real problem is that
> both tools are a bit funky, they don't quite work right.

Agreed.  autorpm is done in Perl though.  I would want to do it in C.

> 
> > - I want this to be able to work with ftp and rpm sites.  Kind of like
> > autoftp and autorpm combined. (anyone have a URL for autoftp)
> 
> I think this is too hard. You need some meta-information that's not
> available in an ftp tarball. If nothing else, you need to know the
> package dependencies. It'd also be good to know types of packages,
> maintainers, signatures, etc.


For RPM stuff it wouldn't be that hard.  You could guess the information
from the filename, then when the user download the file you could
determine what the dependencies are, actual version number is. etc

tarballs are interesting.  If you want to find new upgrades (any changes
to the directory) you can do an LIST and dump it to a dir.  Then next
time it runs do a diff and whatever resolves will be your additional
file (assuming it is a tarball and assuming it is not a dir).  But you
are right... no meta info could be obtained in this form.


> 
> > - I don't want this to be linux specific. I want people to be able
> > to use this on Solaris as well. In this case you would look for
> > .tar.gz files on ftp servers.
> 
> RPM and Debian are not Linux specific - they both work just fine on
> other Unices. The only problem is that so far no one bothers to
> package much Solaris software that way. Build a tool that gives an
> incentive to use a package tool on Solaris, and the packages will come.


Right.  But nobody uses them.  Maybe pkg can be added later.

> 
> There's a lot of good work between rpm, dpkg, apt, alien, autorpm, and
> rpmfind. What's missing is a good glue to hold them all together in a
> simple, straightforward, and most-importantly *correct* way. GnoRPM is
> getting there, I'm disappointed that Redhat 6.0 didn't go further with
> it.
> 
> >I have also been working on some code (mostly fixing an FTP library I
> >found) and updated my feature set.  What do you think?
> 
> ftp libraries are easy. I think the important thing is to focus on the
> sysadmin issues. If anyone is seriously interested in pursuing this,
> let me know and I'll tap out some ideas I have for a tool like this as
> a basis for a new (value-add) Linux distribution.
> 
>                                                   [EMAIL PROTECTED]
> .       .      .     .    .   .  . . http://www.media.mit.edu/~nelson/


To which sysadmin issues were you refering?  I am very serious about
pursuing this.  If you could send me your ideas I would appreciate it. 
Here are mine:

BENEFITS:

- support for seeing if an ftp directory has changed ex:  WINE
        ex:  monitor ftp://ftp.sunsite.unc.edu/pub/Linux/ALPHA/wine... any
changes and you will get a notification
- support for seeing if any of your rpm's have updates?  via RPMFIND
http queries.
        ex:  basesystem-4.9-3 ->
ftp://rpmfind.net/linux/Mandrake/6.0/6.0pre/Mandrake/RPMS/basesystem-6.0-5mdk.noarch.rpm
- support for seeing if your particular distribution has a specific
upgrade:
        ex:  Redhat 5.2 having an upgrade for Apache

FEATURES:

- run's as a daemon (optional)
- GUI config tool (GTK)
- send e-mail on upgrade notification
- auto-download for some specific upgrades
- you can pick and choose which upgrades/applications you want to
monitor.
- support for multiple FTP servers... if one has too many users it will
automatically go to another one.
- uses rpm -i in the background
- ability to let the user use kpackage to perform an rpm install
- ability to warn the user on certain packages.
- ability to check the version after and before (via the file name) the
file is downloaded
- multiple country support
- multiple Linux distributions support
- print out all installed packages via the GUI... if any are out of date
highlight them in RED.
- file progress indicator as files are downloaded.
- support for dependency packages
- support for "ignoring" a package... no more updates.
- support for always finding the "newest" package regardless of
distribution.
- rpmfind support
- support for upgrading individual ones or all of them..
- support for a GUI rpmfind tool
- console log of what the ftp client is doing.
- support for determing fastest connection to an ftp server (via ICMP)..
somewhat accurate guess.
- description of currently selected package
- support for listing files within a package
- load balance among ftp servers.
- support for obtaining current RPM (Redhat, Caldera, SuSe, etc)
directories from an http server via RDF or XML
- support for finding other packages.

FEATURE BREAKDOWN

- .01
        - rpm support only
        - support for basic gui...  lists of your rpms (without tree)
        - support for installing an rpm via (rpm -i)
        -  ftp load balancing
        - configuration through file
        - support for dependencies (maybe just viewing... not downloading)
        - support for REDHAT only.

Redhat 6.0 RPM locations

-
ftp://ftp.codemeta.com/pub/mirrors/redhat/distributions/current/i386/RedHat/RPMS/
-
ftp://clickclick.newnova.com/pub/linux/redhat/ftp.redhat.com/redhat-6.0/i386/RedHat/RPMS/



-- 
Kevin A. Burton
Internet Guy

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


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