Linux-Development-Sys Digest #759, Volume #8     Wed, 30 May 01 08:13:08 EDT

Contents:
  Re: Prob. w/ mem mapped ISA card ("Norm Dresner")
  environment variable confusion (Eric Taylor)
  Re: Lilo question ("Odin")
  Newbie having problem with file_operations:readdir() (Matt Jensen)
  Re: fast disk writes (cLIeNUX user)
  Timed Loop in Kernel Module (Somya)
  what about kqueue/kevent for Linux? ([EMAIL PROTECTED])
  Re: linux process monitoring using java??? (Florian 
=?iso-8859-1?Q?Gro=DFe=2DCoosmann?=)
  Re: chainge in struct sk_buff doesn't quite work (Vyacheslav Burdjanadze)
  Re: fast disk writes (Alexander Viro)
  Re: Looking for a software development tool (Vyacheslav Burdjanadze)
  Re: gcc 2.95, segfault when throwing exceptions (_eh_rtime_match) (Nix)
  Question ([EMAIL PROTECTED])
  Re: how to access physical memory at specified address? ("Christoph Pacher")
  TTI (TTY?) ("Ludwig")
  Re: TTI (TTY?) (Josef Moellers)

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

From: "Norm Dresner" <[EMAIL PROTECTED]>
Subject: Re: Prob. w/ mem mapped ISA card
Date: Tue, 29 May 2001 22:21:13 GMT

Jason M. LaPenta <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> Hello.
>
> I'm trying to figure out why I can't access my custom built ISA card on
> my linux box. It supposedly works fine with some ISA tester under WinNT
> that someone else checked the board out with.
>
> As a fundamental test I searched through the ISA memory 0xA0000 -
> 0xFFFFF to see what was there with both the board in the machine and the
> board out of the machine. In both cases I got the same result. Here's
> the code I ran via IOCTRL. Other cards show up when I test byte by byte,
> but nothing shows up when I test word by word ( my custom card is a
> 16bit isa card ). Am I doing something wrong or is my card not working?
>
> Thx in advance
> Jason
>
> int index = 0;
> unsigned short int testw = 0;
> unsigned short int savew = 0;
> int good = 0;
>
> printk( "scan : debug information\n" );
> printk( "scan : searching for memory\n" );
>
> for( index = 0xA0000; index < 0xFFFFF; index++ )
> {
> savew = isa_readw( index );
> isa_writew( 0x5555, index );
> testw = isa_readb( index );             <+++++ I think this should be:
isa_readw( index );
> if( testw == 0x5555 && good == 0 )
> {
> printk("0x%x", index);
> good = index;
> }
> else if( testw != 0x5555 && good != 0 && index != (good + 1) )
> {
> printk(" - 0x%x \n", (index - 1));
> good = 0;
> }
> else if( testw != 0x5555 && good != 0 )
> {
> printk(", ");
> good = 0;
> }
> isa_writeb( savew, index );
> }

If nothing shows up with the code above it could be because you're writing a
word at a time but only reading one byte which can never equal 0x5555!!

If that's just a typo in this e-mail, you could clarify what you mean by
"Other cards show up when I test byte by byte, but nothing shows up when I
test word by word"  Do you mean to say that your card doesn't show up in
byte-by-byte either?  If similar code has worked in the past in a DOS-like
environment, I'd have to believe that the board may be broken (now).  If
nothing I've said resonates with the facts, you might try posting additional
information like:
        What kernel?
        What's the contents of the isa_read/write-w/b functions if you know?

    Norm




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

From: Eric Taylor <[EMAIL PROTECTED]>
Subject: environment variable confusion
Date: Tue, 29 May 2001 22:49:08 GMT

I am debugging code (written by others) that restore a program
to a prior state by reading in saved areas of memory including
the stack. It works fine, except for problems with environment
variables.

Some questions:

1. How is the variable environ set up. It appears to be
located at different addresses depending on the program.
Where does it get it's "initial" value. Can't this value be
at different locations?

2. Do all routines that support environment variables find
variables using environ? What happens if the base code (non
library) does not include environ, and a dll gets called which
does need this? How is this accomplished?

3. Does the shell set these up when it forks off to a new process?

thanks
eric



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

From: "Odin" <[EMAIL PROTECTED]>
Subject: Re: Lilo question
Date: Wed, 30 May 2001 00:52:42 +0200

It's correct that the two 45gb drives show up as one 90gb drive.
I have a linux install on my secondary master controller on the
mainboard(hdc) To boot this I set my BIOS to boot C first. However,
to boot windows I have to set the BIOS to boot SCSI first. Since
linux doesnt support my pci ide ata raid card yet, I cant make lilo boot
the raid array either. Some people have written suggestions, but they
are way to complex for this problem. (The solution must be easy)

So, when lilo displays the OSes, is there a way to abort it (or quit?),
so that the BIOS boot sequence is continued? Eg. My bios is set to
boot A,C,SCSI. Lilo is installed on C. If I can make lilo quit without
loading
linux, the bootsequence will continue to boot SCSI, or am I wrong here?

Thanks!


bill davidsen <[EMAIL PROTECTED]> wrote in message
news:9f0pap$1s12$[EMAIL PROTECTED]...
> In article <KCNQ6.2553$[EMAIL PROTECTED]>,
> Hugin <[EMAIL PROTECTED]> wrote:
>
> | It's not a "real" SCSI card, eg. its an IDE Raid card: Promise
FastTrak100.
> | Its got its own BIOS, and I have windows installed on a 90GB raid array,
> | which boots just fine if my MB-bios is set to boot SCSI.
> |
> | MB-BIOS and OSes treats it as a SCSI card. My problem is that the
controller
> | is not supported under linux, so lilo can't see it. Therefore I cannot
add a
> | bootline to lilo either. If you know how, please let me know!
>
>   I think your BIOS is confused... It sounds as if the "SCSI" setting
> really means to use the BIOS on the controller. Try booting a CD like
> Slackware or Redhat (rescue) and see if you have hda and hdb or some
> such available. I thought that the Promise controller made the multiple
> drives look like a single drive at the register level, but I just read
> the advertising blurb.
>
>   Also... there is support (experimental) for Promise 4030 and 5030
> chipsets, you might try using that in 2.4.5 or so and see if it helps.
>
> --
>   bill davidsen <[EMAIL PROTECTED]>  CTO, TMR Associates, Inc
> At LinuxExpo Sun was showing Linux applications running on Solaris.
> They don't get it, the arrow points the other way. There's a reason why
> there's no SolarisExpo, Solaris is a tool; Linux is a philosophy, a
> religion, a way of life, and only incidentally an operating system.



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

From: Matt Jensen <[EMAIL PROTECTED]>
Subject: Newbie having problem with file_operations:readdir()
Date: Tue, 29 May 2001 21:25:02 -0500
Reply-To: [EMAIL PROTECTED]


Hello!  I am trying to port an old, simple filesystem (Apple ProDOS/SOS)
to Linux as an exercise in Linux FS development.  I'd say that I have
about 25% of the code finished at this point.  But I'm having a problem:
for some reason, I am unable to pass any directory entries back to the
user when I get a file_operations:readdir() call.

When the readdir() call comes in, I am able to pass entries to filldir()
with no apparent errors (it always returns 0.)  The problem is that
these entries seem to be simply vanishing after filldir() gets them. 
They never get back to 'dir' or any other program that does the
opendir()/readdir()/closedir() loop.  They read it as an empty
directory.  In all of my studies of the kernel code, I have not been
able to figure out where the entries are going.  I'm not seeing any
errors ANYWHERE.

Here is the (basically bare) readdir() code from my dir.c:

/**** begin readdir() ****/
int readdir(struct file *filp,void *dirent,filldir_t filldir) {
        struct inode * const inode = filp->f_dentry->d_inode;
        int found = 0;

        switch (filp->f_pos) {
                case 0:
                        if
(filldir(dirent,".",1,filp->f_pos,inode->i_ino,DT_DIR) < 0)
                             return 0;
                        filp->f_pos++;
                        found++;
                case 1:
                        if
(filldir(dirent,"..",2,filp->f_pos,filp->f_dentry->d_parent->d_inode->i_ino,DT_DIR)
< 0)
                             return 0;
                        filp->f_pos++;
                        found++;
                default:

                        break;
        }

        /* TODO: Find real entries here. :-) */

        return found;
}
/**** end readdir() ****/

The VFS calls my readdir() function twice.  The first time, I send back
two entries (the old standards) and return 2; the second time, I send
back nothing and return 0.  The filldir() calls NEVER return an error. 
The user also never gets an error from opendir()/readdir()/closedir() in
user space.  It just sees an empty directory.

Does anybody have any idea why this may be happening?  Or where my
directory entries are getting dropped?  Most of my file_operations and
inode_operations functions are not yet implemented for directories. 
Could the entries be dropped because some required function is not
implemented yet?  I'm not seeing any calls into the file_operations or
inode_operations...or am I missing something?

Just wondering if any of the gurus out there have any ideas before I dig
in any deeper...

Thanks for your time!

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

From: r@cLIeNUX. (cLIeNUX user)
Subject: Re: fast disk writes
Date: Wed, 30 May 2001 04:08:14 -0000

[EMAIL PROTECTED]
>In article <[EMAIL PROTECTED]>,
>cLIeNUX user <r@cLIeNUX.> wrote:
>
>>I thought Linux' first filesystem was Minix, and Remy Card wrote ext2 ON a
>>Minix filesystem?
>
>Minix filesystem is a toy version of v7 fs with block bitmap added in the
>beginning of the disk. Ext2 consists of cylinder groups, each with its own

A block bitmap. That's a rather striking family trait, don't you think?

>fragment of inode and block bitmaps and inode table - the main improvement
>introduced by FFS. Directory layout is straight from FFS, except for the odd

"the main improvement introduced by FFS" being cylinder groups, yes? 

>decision to use block boundaries instead of sector ones for alignment and 
>dropping terminating \0 from entry names. Hell, a lot of algorithms are
>exactly the same (inode allocation, directory handling, yodda, yodda).
>
>The only thing ext2 and minixfs share is a distant common heritage - they
>have inodes, they have directories stored the same way as files, they have
>similar trees of indirect blocks growing from inode, they have more or
>less the same set of attributes in the inodes (albeit minixfs at that time
>had only 2 timestamps, too small i_data[], 16bit block numbers, etc.).
>Hardly surprising, since all that stuff had been there since _very_ old
>days, way before Minix, let alone Linux. Heck, most of that had been in
>place since 1969.
>
>Now, ext (also by Remy) was a "minixfs sans the most annoying limitations",
>but ext2 is _not_ a modified ext. Completely new beast. RTFM - all of
>them have decent descriptions.
>

>Oh, and what was your bet, again?

My bet was private. I did get paid though.

Anyway, real programmers use native disc blocks and a Forth block editing
vocabulary. From Linux kernelspace ;o)

AnyAnyway, most informative, Al. Thanks. 

Rick

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

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

From: [EMAIL PROTECTED] (Somya)
Subject: Timed Loop in Kernel Module
Date: 29 May 2001 21:18:17 -0700

Hi!
              I am writing a kernel module which requires to poll the SCSI disk
              at regular intervals to look for data. I just wanted to know the way
              so as to execute this interval ..Is there something like timed
              loop..I am working in Linux Red hat(6.2) kernel(2.2.14)..
              Kindly help me out.
              Thanks in advance,
              somya

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

From: [EMAIL PROTECTED]
Subject: what about kqueue/kevent for Linux?
Date: 30 May 2001 04:28:13 GMT

So what is the chance of adding the kqueue/kevent system functions
to the next version of Linux?

What I am referring to are the functions found in FreeBSD that let
a process wait for numerous classes of events in an orderly and
efficient manner.  There's even a change proposed that can solve
the thundering herd problem listening on sockets in select/poll.

-- 
=================================================================
| Phil Howard - KA9WGN |   Dallas   | http://linuxhomepage.com/ |
| [EMAIL PROTECTED] | Texas, USA | http://phil.ipal.org/     |
=================================================================

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

From: Florian =?iso-8859-1?Q?Gro=DFe=2DCoosmann?= <[EMAIL PROTECTED]>
Subject: Re: linux process monitoring using java???
Date: Wed, 30 May 2001 07:34:46 +0200

Hi,

Ben Tan wrote:
> 
> hi,
>     I would like to know if there is any program utilies like top that I can
> use to extract each process uptime? I can't find any info about the /proc/
> directory that I can parse to extract the info.

Try "top -bn1", read "man 1 top" and "man 5 proc". Is this enough?

Cheers, Florian

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

Date: Wed, 30 May 2001 10:18:19 +0400
From: Vyacheslav Burdjanadze <[EMAIL PROTECTED]>
Subject: Re: chainge in struct sk_buff doesn't quite work

> Because it oopses everytime (shortly or directly after the login
Did you rebuild entire kernel and all modules?

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

From: [EMAIL PROTECTED] (Alexander Viro)
Subject: Re: fast disk writes
Date: 30 May 2001 02:08:38 -0400

In article <[EMAIL PROTECTED]>,
cLIeNUX user <r@cLIeNUX.> wrote:
>>Minix filesystem is a toy version of v7 fs with block bitmap added in the
>>beginning of the disk. Ext2 consists of cylinder groups, each with its own
>
>A block bitmap. That's a rather striking family trait, don't you think?

Not really. It's an obvious (and in case of minixfs - half-assed) fix for
nightmarish block allocation stuff in v7.

>"the main improvement introduced by FFS" being cylinder groups, yes? 

Cylinder groups, spreading the fs metadata over said groups, algorithms
that maintain decent localty of references. That fixed the worst problems
of v7 fs.  Other fun stuff was support of long names (> 14 characters)
and symlinks.

v7 fs didn't scale and it had very bad fragmentation problems. When fs
on your box is unable to use more than 2% of disk bandwidth - something
is seriously rotten. The thing was OK for small disks. In 80s it became too
bad for serious use.

Minixfs was limited to 64Mb, BTW. _And_ it had all lovely problems with
excessive disk seeks, too short names, etc. When size-related limits
were raised the scalability problems had hit full-force. And since the
solution was well-known (for ~10 years) and well-documented... <shrug>
Why bother trying to modify minixfs/ext when you can implement a known
good solution?

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

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

Date: Wed, 30 May 2001 10:20:09 +0400
From: Vyacheslav Burdjanadze <[EMAIL PROTECTED]>
Subject: Re: Looking for a software development tool

Krithika Chidambaram wrote:
> 
> Hi,
>   I am looking for a tool to develop GUI on Linux platform to do Rapid
> Application Development(RAD) with good IDE like Visual Studio (Visual Basic,
> Visual J++,etc).
> I would really appreciate  if someone could help me find it.
> Thankyou,
> Sukumar

SlickEdit + Qt Designer
http://www.slickedit.com
http://www.trolltech.com

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

From: Nix <$}xinix{$@esperi.demon.co.uk>
Subject: Re: gcc 2.95, segfault when throwing exceptions (_eh_rtime_match)
Date: 30 May 2001 08:25:21 +0100

On Wed, 30 May 2001, Dirk-Jan C. Binnema said:
> In article <[EMAIL PROTECTED]>, "Nix"
> <$}xinix{$@esperi.demon.co.uk> wrote:
> 
>> Exception handling tables are a global property of the program, because
>> of the need to throw across translation unit boundaries; they can't
>> change form within a single process.
> 
> Hmmm... does this also apply to the shlib's? I would think so; however,

Yes.

> that'll cause a lot of headache when trying to use multiple binary-only libs which
> were compiled with different settings....

I guess it's a good thing that in 15 days or so we'll have GCC 3 with
one and only one (much better) exception handling scheme then :)

>> Something is seriously screwed up. I'd make sure first that everything
>> which your program uses is using the same eh scheme; I expect that that
>> will fix it.
> 
> Hmm... I kept on seeing crashes; some third party (bin only) libs may be the
> cause. Doesn't close source suck...

Oh yes; but if you don't throw *through* those libraries, and those
libraries don't themselves throw, you should be safe.

> Anyway, I seem to have solved the problem by explicitly linking with
> -lgcc before -lstdc++. I can't say I totally understand, though.

*boggle*

(You should be using `c++' not `gcc' anyway, hence no -lstdc++ should be
needed.)

> Anyway, thanks a lot.

That's OK.

-- 
`Technology is meaningless. What matters is how people _think_
 of it.' --- Linus Torvalds

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

From: [EMAIL PROTECTED]
Subject: Question
Date: Wed, 30 May 2001 10:04:17 GMT

Hello!

Excuse me, is this newsgroup a suitable place to ask questions about kernel
programming?

-- 
Alexey

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

From: "Christoph Pacher" <[EMAIL PROTECTED]>
Subject: Re: how to access physical memory at specified address?
Date: Wed, 30 May 2001 12:34:56 +0200

> > I need to read/write memory blocks at a specified address space to test
> > DRAM chips. Is there a possibility to prevent the kernel (and
> > applications) from using/allocating predefined memory blocks?
>
> Yes. Adding to the kernel prompt mem=128M on a 256MB system leaves the
> top 128MB of RAM untouched and you can use them as you wish.
>

Thanks, I think this will help me on my next steps!
But in the case that I will need to reserve memory space at an arbitrary
position (e.g. between 32MB and 64MB on a 256MB system) is there another
method?

I can image that there is some linker option I can use while linking a new
kernel..., but if somebody know more about it, please let me know!

--
Christoph Pacher



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

From: "Ludwig" <[EMAIL PROTECTED]>
Subject: TTI (TTY?)
Date: Wed, 30 May 2001 11:05:49 GMT

Hi,

does anyone know what we need to be able to communicate with our Linux
platform using a serial line, instead of using ethernet + telnet?

It appears there is a 'default ' application for Linux supporting this...
Also, what do we need on the other pc then? A terminal application?

Thanks,








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

From: Josef Moellers <[EMAIL PROTECTED]>
Subject: Re: TTI (TTY?)
Date: Wed, 30 May 2001 14:01:00 +0200

Ludwig wrote:
> =

> Hi,
> =

> does anyone know what we need to be able to communicate with our Linux
> platform using a serial line, instead of using ethernet + telnet?
> =

> It appears there is a 'default ' application for Linux supporting this.=
=2E.
> Also, what do we need on the other pc then? A terminal application?
> =

> Thanks,

There are a number of possibilities:
1) you start a getty of some sort (agetty, mgetty) on the serial line
and use any terminal emulator on the other side, e.g. ProComm.
2) you start ppp on the serial line and on the client side and just use
telnet or rlogin or whatever.

HTH,
-- =

Josef M=F6llers (Pinguinpfleger bei FSC)
        If failure had no penalty success would not be a prize
                                                -- T.  Pratchett

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


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

Reply via email to