Linux-Development-Sys Digest #40, Volume #7 Wed, 11 Aug 99 00:14:07 EDT
Contents:
Re: printk ??? (dave)
Re: Which file systems are write stable on Linux? (Christopher Browne)
Re: How do I use source RPMs (Christopher Browne)
2.3.12 sound problems (Preston F. Crow)
how to tell a process is background? (Yung-Hsiang Lu)
----------------------------------------------------------------------------
From: dave <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.misc
Subject: Re: printk ???
Date: Tue, 10 Aug 1999 21:37:46 -0400
"Hung P. Tran" wrote:
> I am having trouble getting printk to work in my driver.
> I tried:
>
> printk(KERN_CRIT "start of init_module\n");
>
> It's NOT working. I also get a warning when compiling my driver:
>
> warning: implicit declaration of function printk_R1d7b4074
>
> Any idea what happened ???
>
> Thank you in advance,
>
> hung
I Had the same problem with the compiler warning message with printk.
I have "set version information on all symbols for modules" turned on
in the kernel. (you probably do too)
check CONFIG_MODVERSIONS in /usr/include/linux/autoconf.h it will be
#define'd and set to 1
1.) you can turn "set version information" off and recompile the kernel
(not the easiest choice).
2.) make sure you have <kernel.h> included AFTER includeing <module.h>
and <modversions.h>, since kernel.h
has the prototype for printk(), and the compiler or pre compiler
doesn't know do do any thing with version
information on symbols for modules until it reads module.h, here
is what I mean:
#include <linux/module.h>
#if CONFIG_MODVERSIONS==1
#define MODVERSIONS
#include <linux/modversions.h>
#endif
/* now include kernel.h */
#include <linux/kernel.h>
-dave
------------------------------
From: [EMAIL PROTECTED] (Christopher Browne)
Subject: Re: Which file systems are write stable on Linux?
Reply-To: [EMAIL PROTECTED]
Date: Wed, 11 Aug 1999 02:00:04 GMT
On Tue, 10 Aug 1999 18:21:35 GMT, Randall Parker <[EMAIL PROTECTED]> wrote:
>In article <7opjbp$[EMAIL PROTECTED]>, [EMAIL PROTECTED]
>says...
>> Unless something is totally wonky, databases that I have seen rarely, if
>> ever change the names of their data files. Depending on the load, the
>> transaction logs are created every 30 minutes or more. If you have much
>> more in the direction of transaction logs being created, maybe you should
>> increase the max size of the log.
>
>I think there are RDBMSs that write out their transaction logs
>synchronously. So if either the transaction log on one partition or the
>database itself on another partition would survive a system crash then
>there would be some way to get back pretty close to the final state of
>the database of where it was at when the system crashed.
>
>If a volume can't be read at all (because the metadata is garbled)
>whether its database files are up to date or not is a moot point. If you
>can't get to them how much is in them doesn't matter.
The book "Transaction Processing: Concepts and Techniques"
<http://www.amazon.com/exec/obidos/ISBN=1558601902/northtexaslinuxuA/>
is pretty much the definitive reference on this sort of thing; I'm
sure it would be read to counsel that transaction logs be stored on a
separate disk from the database itself.
Oracle suggests the same, and I'm never quite sure just how many
copies of their "control file" they want saved hither and thither.
A reasonable reading of the TP:C&T discussion of logging might suggest
that the use of raw partitions is preferable, as this allows you to
avoid "filesystem metadata" problems altogether.
Of course, you are then creating your own 'pseudo-filesystem,' which
engenders its own set of joys and sorrows...
>> If it is other files that are being created on a rapid basis, then that is
>> a different issue.
>
>One thing I thought of was to put the database files on their own
>partition. That way there is less updating of the directory entries and
>less chance that a metadata corruption at the time of system crash would
>render the whole partition or much of the partition's files unaccessible.
>
>But as a database file grows in size doesn't the directory entry for it
>get updated to reflect its size? So it is getting written to all the
>time, right? Granted, it probably only gets updated and stays at the same
>location on the disk and the links between the directory entries probably
>(I am guessing) do not change.
It's still helpful to keep them on separate partitions, as it reduces
the likelihood that both will "go down."
Again, this is the sort of thing you'll find if you look at Oracle DBA
documentation...
>>I don't think many, if any, JFS filesystems guarantee
>> consistency of data, only consistency of metadata.
>
>Aside: elsewhere I have read that AIX can't use JFS on its boot
>partition. So its journalling is helpful for the metadata on data
>partitions. A friend who runs a mix of different OSs tells me he still
>runs first to his AIX machine to shut it down gracefully when power has
>failed and he is running hardware on his UPS boxes. He finds AIX's file
>system on the OS partition to be fragile.
When I was working with Digital OSF/1, the recommendation was for the
boot partition to use traditional UFS because that's a longstanding
"lowest common denominator" technology. You don't need as much
"stuff" up and running to access UFS as you do to access other "more
entertaining" filesystems.
I rather think that ext2 will serve the same purpose on Linux, even as
ext3, xfs, and Reiserfs get more widely deployed.
>> I think that one of the BSDs has what you are looking for in terms
>> of sync metadata updates.
>
>That is very useful to know.
Agreed.
Don't discuss it on a Linux newsgroup; such discussions tend to get
heated, and head to cross-purposes. (And make everyone not involved
very cross...)
>> There
>> was a big discussion a few months back about this, with *BSD people saying
>> that sync metadata was the way to go, while Linux people said that if you
>> are writing out data blocks it doesn't affect metadata, and if you crash
>> while writing metadata, it doesn't really matter if you are writing those
>> out first.
>
>But if the metadata is being written out synchronously then at any given
>time when power fails there is a lower chance that there will be metadata
>waiting to be written and there will, on average, be less metadata
>waiting to be written.
>
>I realize that there is no wonderful panacea. I am just looking for
>techniques that reduce the frequency of data losses and the size of
>losses when they do occur.
At this point, I'd put "keep logs and database files on separate
partitions/disks" high on the to-do list, regardless of anything else
you do.
"Look at *BSD" would be fairly high on the list.
"Look at presently-available alternative FSes on Linux" should be low
on the list. Reiserfs is the only one that's presently at all worth
looking at, and I'd say it still needs further testing before people
can start to become confident in it.
--
Lisp stoppped itself
FEP Command:
[EMAIL PROTECTED] <http://www.hex.net/~cbbrowne/tpmonitor.html>
------------------------------
From: [EMAIL PROTECTED] (Christopher Browne)
Subject: Re: How do I use source RPMs
Reply-To: [EMAIL PROTECTED]
Date: Wed, 11 Aug 1999 01:59:39 GMT
On 10 Aug 1999 16:19:29 -0400, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>But if you grab a source RPM and it doesn't build in your environment,
>because it's different than the author's environment, then it's a pain
>in the ass.
It probably displays that either:
a) The SRPM requires software that you haven't yet installed, which
you need to know, or
b) The specs weren't well-written, as it has some substantial
environmental dependancy that was Dumb To Assume.
--
"Bother," said Pooh, as he deleted his root directory.
[EMAIL PROTECTED] <http://www.hex.net/~cbbrowne/lsf.html>
------------------------------
From: [EMAIL PROTECTED] (Preston F. Crow)
Subject: 2.3.12 sound problems
Date: 11 Aug 1999 02:33:03 GMT
I recently installed Red Hat 6.0, and sound worked fine with the
included kernel. It also works fine with 2.2.10. However, with
2.3.12, the sounds that the Red Hat setup plays still sound fine, but
other files (such as mp3s played by mpg123 or the sound from the myth2
demo) play really slow, like playing a record at the wrong speed.
Is there something I'm doing wrong, or is something broken?
--PC
[Now to kill whatever that is that keeps changing the permissions in
/dev. I think I'll go back to Slackware next time.]
--
"I'm guilty of a lot of things, but I didn't ever do that.''
--Bill Clinton, on why he had astroturf lining the
back of his pickup truck
------------------------------
From: [EMAIL PROTECTED] (Yung-Hsiang Lu)
Subject: how to tell a process is background?
Date: 10 Aug 1999 23:11:48 GMT
Hi, Everyone,
I am curious whether there is a way to tell if a process is running at
the background and does not interact with users (directly). I did not
find anything in "task_struct" (sched.h) that seems able to tell me
the information. I think priority won't do the job because top shows
that quite a few processes have the same priority; some of them are
background while the others are interactive.
Thanks a lot!
--
Sincerely,
Yung-Hsiang Lu
[EMAIL PROTECTED]
------------------------------
** 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
******************************