Linux-Development-Sys Digest #792, Volume #6 Mon, 7 Jun 99 16:14:14 EDT
Contents:
Re: Proposal for XML Configuration files (Lew Pitcher)
Re: select() vs. poll() ([EMAIL PROTECTED])
some question on do_timer() ("Soohyung Lee")
change ip adress in c program ("Thierry BUCCO")
Re: Function as OLE compound document? (Alex Hornby)
Re: the ultimate OS (Sid Cammeresi)
Re: Kernel Changes 2.0.x->2.2.x???? (Frank McGirt)
pci driver ("ciprut ethan")
IP/IPX encapsulation ([EMAIL PROTECTED])
Re: What are the differences between mySQL and mSQL? (Don Baccus)
Re: Exit status, $?, and term status (James Youngman)
Re: TAO: the ultimate OS (Nix)
Re: TAO: the ultimate OS (Nix)
Re: select() vs. poll() (=?iso-8859-1?Q?Bj=F8rn?= Reese)
----------------------------------------------------------------------------
From: [EMAIL PROTECTED] (Lew Pitcher)
Crossposted-To: comp.unix.programmer,comp.os.linux.development.apps
Subject: Re: Proposal for XML Configuration files
Reply-To: [EMAIL PROTECTED]
Date: Mon, 07 Jun 1999 11:42:37 GMT
It is just such dissatisfaction with "the current way of doing things"
that has lead to the variety of config file languages present in Unix
today. Believe me, you're XML config file format won't supplant the
existing formats, it will just add another of them. In other words, you
are part of the problem (at least the problem that you perceive), and
not part of the solution.
On Fri, 04 Jun 1999 18:33:43 +0200, Marco Stipek <[EMAIL PROTECTED]> wrote:
>Linux/Unix is one of the best operating systems worldwide, but in my
>opinion
>there is one bad thing thousends of config files in any format you can
>imagine,
>changing from version to version (like old and new Bind configs).
>
>Is there anybody in the web thinking about a standard on this topic,
>maybe based on XML?
>
>If not maybe there is any developer interested in starting such a
>workgroup. Get touch with me.
>
>Marco
Lew Pitcher
System Consultant, Integration Solutions Architecture
Toronto Dominion Bank
([EMAIL PROTECTED])
(Opinions expressed are my own, not my employer's.)
------------------------------
From: [EMAIL PROTECTED]
Subject: Re: select() vs. poll()
Date: 7 Jun 1999 11:48:10 GMT
G. Sumner Hayes <[EMAIL PROTECTED]> wrote:
: [EMAIL PROTECTED] wrote:
:> I was wondering what is the practical difference between the functions
:> 'select()' and 'poll()'? I've used the former quite a lot, but stumbled
:> over the latter today. poll() seems to have entered Linux quite
:> recently, and I think the interface it provides is nicer then select().
: poll() has been around at least since 1.3.x kernels, so for a few
: years anyway.
Ok, the man-page says that the 'systemcall' poll() was introduced in
2.1.23, but the wrapper around select() is probably much older.
:> Thread-safety (I use threads)? Stability?
: Both are thread safe and stable. select() is somewhat more portable.
: If performance with large numbers of fds is important then you
: probably want to use autoconf to check for poll() and use it if
: possible; otherwise go with select().
Yep, but it can be quite hard to do in practically, as the syntax of the
calls are very different. My code is basically Linux-specific (IMHO it's
quite hard to get apps using a lot of net-code to compile nicely on
multiple platforms), so I'll switch to poll(). The syntax is cleaner and
seems less 'hackish' to me.
: Neither is highly scalable,
: so schemes that fork multiple process and divide up fds between them
: are used in large servers.
Hmm, I've been thinking about that. My app can have a maximum of 250
clients (should never happen though) and that traversing (worst case) all
them can take some time.
: Thread safety is there, but efficiency in SMP setups is not. All
: processes that are polling (or selecting) on an fd are woken when
: it's available -- that can lead to a thundering herds problem if
: you have a ton of processes polling on one fd (common in some thread
: models). The wake-one accept() in the early 2.3.x kernels is there
: to help deal with this, and further wake-one semantics are planned
: for other interfaces in the 2.3.x kernels.
I don't have multiple threads using the same fd, so this shouldn't be a
problem.
Thanks for the comments and help, they convinced me that it will be worth
to convert to poll() in my app!
Regards,
Chakie
--
=====================+======================================================
Jan 'Chakie' Ekholm | CS at �bo Akademi University, Turku, Finland
Linux Inside | I'm the blue screen of death, no-one hears you scream
------------------------------
From: "Soohyung Lee" <[EMAIL PROTECTED]>
Subject: some question on do_timer()
Date: Mon, 7 Jun 1999 21:05:23 +0900
Hi..
In do_timer() (kernel/sched.c) , I have some trouble at the following stuff.
Can anyone tell me what it mean ?
if (prof_buffer && current->pid) {
extern int _stext;
unsigned long ip = instruction_pointer(regs);
ip -= (unsigned long) &_stext;
ip >>= prof_shift;
if (ip < prof_len)
prof_buffer[ip]++;
}
Can anyone explain this to me ?
Thanks in advance .
- Lee -
------------------------------
From: "Thierry BUCCO" <[EMAIL PROTECTED]>
Subject: change ip adress in c program
Date: Mon, 07 Jun 1999 14:16:49 +0200
Hi,
is there anybodu wrote function to change ip adress in my c program.
Or how can i do that ?
Thanks a lot.
Thierry - FRANCE
------------------------------
Crossposted-To:
comp.object.corba,comp.os.linux.development,comp.os.linux.development.apps
Subject: Re: Function as OLE compound document?
From: Alex Hornby <[EMAIL PROTECTED]>
Date: 07 Jun 1999 13:34:14 +0100
Luigi Montezuma <[EMAIL PROTECTED]> writes:
> Enosh Chang wrote:
> > ...is there any function like OLE to generate
> > compound document in Linux?
> No.
>
> ------------------------------------------
> len
> if you must use email, reply to:
> 73 662 dot 26 51 at compuserve dot com
Not strictly true :) Both KDE and GNOME have component models. www.kde.org,
www.gnome.org. Try them and make up your own mind.
(Follow ups set to comp.os.linux.development.apps.)
Alex.
--
Alex Hornby Mail: [EMAIL PROTECTED]
Anvil Software Limited Tel: +(44)171 749 7900
51-53 Rivington Street
London EC2A 3SE
------------------------------
From: [EMAIL PROTECTED] (Sid Cammeresi)
Crossposted-To: alt.os.linux,comp.os.linux.advocacy,comp.os.misc
Subject: Re: the ultimate OS
Date: 7 Jun 1999 13:45:14 GMT
Reply-To: [EMAIL PROTECTED]
On Mon, 07 Jun 1999 00:58:45 GMT, <[EMAIL PROTECTED]> wrote:
>On 6 Jun 1999 22:04:11 GMT, Sid Cammeresi <[EMAIL PROTECTED]>
>>On Sun, 6 Jun 1999 13:36:35 -0700, FM <[EMAIL PROTECTED]> wrote:
>>>I'd like to see a file system that
>>>lets a file have subfiles
>>
>>BFS is what you want, although the subfiles (attributes in BFS parlance)
>>are not files qua files. BFS also has indexing, querying, and other goodies.
>
>Can you give a URL or two that would elaborate on this?
BFS goodies are in the Storage Kit section of the Be Book:
http://www-classic.be.com/documentation/be_book/The%20Storage%20Kit/index.html
under Attribute Functions, Index Functions, and Query Functions. In a
nutshell, you call fs_open_attr_dir and get a (DIR *) back which represents
the attribute directory. You can the read individual attributes using
fs_read_attr. Attributes are referenced by name; they are not opened
separately and do not get their own file descriptors, as that would have
complicated the vnode layer quite a bit more (can't close a file until
all attributes are closed, etc.).
I don't know of anything else online, but then, I haven't looked either.
If you are into dead trees, Dominic Giampaolo, the chap who designed the
filesystem, wrote a book on it that came out a few months ago called
*Practical Filesystem Design With the Be File System*. Although it is
not a technical specification, it is a very good book if you are interested
in learning a bit on filesystems.
>This sounds a whole lot like:
>a) Tom Lord's "Berkeley DB" (which isn't the same thing as db-lib), and
Haven't heard of that.
>b) Stuff the Reiserfs folk are considering...
I would find that surprising given this entire concept is fairly non-POSIX.
sc
--
Sidney CAMMERESI | icbm: 40.112 N, 88.200 W
http://www.omni.cx/~sac |
PGP: 65 6F B3 DA CA 3E 3B 09 | Cxi tie parolas Anglen kaj
32 C8 17 1C 0A 79 2F 3F | Esperanten.
------------------------------
From: [EMAIL PROTECTED] (Frank McGirt)
Subject: Re: Kernel Changes 2.0.x->2.2.x????
Date: Mon, 07 Jun 1999 14:43:06 GMT
Jeff,
I have the same problem and I have posted the below message to
numerous kernel newsgroups. Have gotten almost no responses and none
that have helped to resolve the problem. As far as I know I am doing
everything right but can't seem to get the thing to work. If you find
the answer I would appreciate knowing about it and I will do the same.
Maybe we are the only ones doing this - but I doubt that <g>.
Frank McGirt
[EMAIL PROTECTED]
Earlier Posting:
I have a contiguous memory buffer in my driver that I have allocated
by:
bufAddress = __get_dma_pages(GFP_KERNEL,order);
that I want to map to user space.
The following worked for 2.0.36-3SMP on RH 5.2 but does not
work for 2.2.7SMP on RH 6.0. It gives no error indication
but when I try to store data in the buffer and read it back,
the data is garbage (0xffffffff).
I would appreciate knowing the proper way to do this or
any suggestions about how to proceed.
Frank McGirt
[EMAIL PROTECTED]
2.0.36 implementation:
1. in driver reserve buffer by setting RESERVED bit so that
remap_page range() will work
max_page = MAX_BUFFER_SIZE/PAGE_SIZE
paddr = bufAddress;
for( i = 0; i < max_page; i++ ) {
page = &mem_map[MAP_NR(paddr)];
set_bit(PG_reserved,&page->flags);
paddr += PAGE_SIZE;
}
2. call mmap() from app as:
mmap(0,bufferLength,PROT_READ|PROT_WRITE,MAP_SHARED,fd,bufAddress);
3. in driver mmap() implemented as:
mmap(struct file *file, struct vm_area_struct *vmarea)
{
...
remap_page_range(vmarea->vm_start, vmarea->vm_offset,
vmarea->end -
vmarea->start, vmarea->vm_page_prot);
vmarea->vm_file = file;
file->f_dentry->d_inode-i_count++;
return 0;
------------------------------
From: "ciprut ethan" <[EMAIL PROTECTED]>
Subject: pci driver
Date: Mon, 7 Jun 1999 18:18:48 +0200
Hi all,
Can anyone make some order in memcpy_fromio / vremap / writel / ....
Do i have to vremap/ioremap addresses for a pci driver ? can i only write
from kernel space to the
device ?
If so do i use memcpy_fromio/toio or just memcpy ?
When do i use writel/writeb/writew ?
Thanks
------------------------------
From: [EMAIL PROTECTED]
Subject: IP/IPX encapsulation
Date: Mon, 24 May 1999 23:47:40 GMT
I don't know if this has been touched on befire,
but...
I want to trap the tcp/ip packets going out from
the kernel, and encapsulate them into ipx. The
thing is can i stop the packets going onto the
network ? And if so how would i go about it.
Also, are there any good site that can tell me
about ipx programming, and where i can find info
about kernel traps and kernel programming etc.
Thanks
--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---
------------------------------
Crossposted-To:
comp.os.linux.development.apps,comp.os.linux.misc,comp.os.linux.setup,comp.lang.java.databases
Subject: Re: What are the differences between mySQL and mSQL?
From: [EMAIL PROTECTED] (Don Baccus)
Date: 7 Jun 1999 11:24:10 PST
In article <[EMAIL PROTECTED]>,
Errin Watusikac <[EMAIL PROTECTED]> wrote:
>[EMAIL PROTECTED] (Kaz Kylheku) writes:
>> THe default meaning of ``free'' means ``unfettered''.
...
>I agree "free" is often used correctly for things that are nearly free.
>I strongly disagree that GPLed or LGPLed software is nearly free. Its
>key feature is that it and its derivatives will remain open.
Whatever it might be, it is hardly "free" if Kaz's favorite
meaning of the word ("unfettered") is the definition du jour.
--
- Don Baccus, Portland OR <[EMAIL PROTECTED]>
Nature photos, on-line guides, at http://donb.photo.net
------------------------------
From: James Youngman <[EMAIL PROTECTED]>
Subject: Re: Exit status, $?, and term status
Date: 06 Jun 1999 11:56:55 +0100
John Nolan <[EMAIL PROTECTED]> writes:
> How can I tell whether $? contains the actual exit status
> of a program or its termination signal and coredump flag?
>
> For example:
>
> [A] If I run "ls -l zzzz", where the file zzzz does
> not exist, then $? contains "2". This is the exit
> status of ls.
>
> [B] However, if I run a small compiled C program like this
>
> int main() {
>
> int i;
> i = 1/0; /* Floating point exception, signal 8 */
> }
>
> .....then $? contains "136". 136 is not actually
> the exit status, it is the signal ANDed with
> the coredump flag. (128 && 8, or in hex: 0x80 && 0x08).
Actually, it's 128 + the signal number.
foo
rv=$?
if test $rv -gt 128
then
sig=`expr $rv - 128`
echo "Terminated by signal $sig"
elif test $rv -eq 127
then
echo "Command not found"
else
echo "Exited with status $rv"
fi
--
ACTUALLY reachable as @free-lunch.demon.(whitehouse)co.uk:james+actually
------------------------------
From: Nix <$}xinix{[email protected]>
Crossposted-To: alt.os.linux,comp.os.linux.advocacy,comp.os.misc,comp.unix.advocacy
Subject: Re: TAO: the ultimate OS
Date: 07 Jun 1999 00:28:48 +0100
[EMAIL PROTECTED] (Vladimir Z. Nuri) writes:
> ross reaffirms the idea that linux is "pasted together" and lacks
> an overall vision/philosophy.
POSIX, and common sense where POSIX goes too zany (and it does).
> btw, I respect torvalds, but.. what is the vision for Linux?
> support for parallel processing? ok, ok, great, but come on.
Er, um, why does it *need* a `vision'? `Visions', IMHO, are something
that big companies turn out by the boatload to justify high prices :)
It seems to me that its simply aiming to be the best Unix-like OS that
it can be. Not ambitious, perhaps, but it can't fail :)
> btw, I don't know if a new OS may have to defy linux founders.. I
Hardly. You may have good ideas, if so we can reuse them in the
kernel. (Of course, some good ideas don't fit in a POSIX-like system...)
> can see it as possible. it is entirely possible that linux will
> someday be eclipsed by something different enough that it doesnt
> even resemble it anymore.
Indeed; Linus has said that this is not unlikely, and is probably
desirable, in the long run.
> ok,ok, "ultimate" is not a great word to use in the essay, it
> pushes some buttons. but surely there is a way to have a "way-cool"
> OS even better than what we have now. it surprises me how
Er, yes. But a wish list does not a design document make.
> we can build software with its own
> firewalls built in, in multiple layers.
I have a half-completed design mouldering away somewhere for an OS which
would operate vaguely like this; total VM, all code interpreted, totally
paranoid security... and such overheads that there's little chance of
implementing it soon (if ever); things like a 1500% overhead for
authentication and auditing...
... I was too idealistic in the design, and ended with something almost
unimplementable. I fear this would happen to your idea.
Anything which aims for ideals is good; but aiming for *all* the ideals
at once, in *one* project, is very probably going to fail to even get
close on any of them.
> perhaps what I am proposing is not an OS but something
> bigger than an OS, i.e. the next level of abstraction. I don't
> really care what the low level details are.
*bzzt* in design the devil is in the details. Low-level details can
explode into things that wreck entire designs. You need to think about
things at at least enough detail to get from the `it would be nice
to...' stage to the `this would be a good way to implement...' stage, at
least conceptually. Otherwise what you've got is not a design but a
wish-list. And we've all got those. They generally make poor rallying
cries compared to those projects already out there. (The operative word
being `generally'.)
> part of the essay is suggesting the OS can be made more efficient
> by revisiting the idea of the compiler. it seems to me that
> the compiler is actually a basic part of the OS, and when this
> concept is fully realized by the development community, far more
> powerful/efficient OSes can be created.
Er, er, this is called a virtual machine, if I understand what you
mean. And a number of research OSes do this already. (I *think*
Inferno/Limbo do this sort of thing, for instance. Not sure.)
Pie-in-the-sky ideas are nice, but if Linus had posted on comp.os.minix
in '91 with the comment `I think we should write a better minix' nobody
would have paid attention; they'd just have kept adding patches to
minix. Instead he said (effectively) `I've got this code'; and because
there was code there, people had a base to work from, no matter that it
was only 50K and quite bare-bones. It *worked*, and people evolved it
from there.
The bazaar method works by evolution; and evolution doesn't work from a
standing start. (`omnia cellula e cellula', after all.)
--
`As promised, here's the patch to do this. Not only is it good (it
compiles), but it is perfect (it boots). Up 9 minutes so far without
problems.' --- Richard Gooch on linux-kernel
------------------------------
From: Nix <$}xinix{[email protected]>
Crossposted-To: alt.os.linux,comp.os.linux.advocacy,comp.os.misc,comp.unix.advocacy
Subject: Re: TAO: the ultimate OS
Date: 07 Jun 1999 00:51:29 +0100
[EMAIL PROTECTED] (Stefaan A Eeckels) writes:
> In article <[EMAIL PROTECTED]>,
> [EMAIL PROTECTED] (Vladimir Z. Nuri) writes:
> > systems cannot be implemented coherently without a coherent
> > vision grounding them. does linux repesent a coherent vision? NO.
> Insofar as Linux is UNIX, it presents a pretty coherent vision
> (essentially, everyting is a file, small, cooperative programs
> around a text pipeline, etc). It's a tribute to the coherence
> of the UNIX vision that it is still relevant 30 years after it
> was conceived.
Oh, was *that* what he meant by a vision?
Unix does have one, then (discounting blemishes like SysVIPC).
--
`As promised, here's the patch to do this. Not only is it good (it
compiles), but it is perfect (it boots). Up 9 minutes so far without
problems.' --- Richard Gooch on linux-kernel
------------------------------
From: =?iso-8859-1?Q?Bj=F8rn?= Reese <[EMAIL PROTECTED]>
Subject: Re: select() vs. poll()
Date: Mon, 07 Jun 1999 19:09:35 +0000
[EMAIL PROTECTED] wrote:
> calls are very different. My code is basically Linux-specific (IMHO it's
> quite hard to get apps using a lot of net-code to compile nicely on
> multiple platforms), so I'll switch to poll(). The syntax is cleaner and
poll() is not Linux-specific. It is part of the UNIX98 standard (the successor
of POSIX) and supported by most recent Unices. For example, on Solaris select()
is a wrapper for poll(). However, select() is still more portable as it is
supported on most older Unices and several non-Unix platforms, such as OS/2
and Win32.
You can find the UNIX98 standard at
http://www.opengroup.org/onlinepubs/7908799/toc.htm
------------------------------
** 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
******************************