Mailing List Archive

[patch] parport problems
Okay, I'm now quite hopeful that this patch will fix the problems that
people are seeing. I ran into "insmod parport_pc wouldn't work" just now,
and this sorted everything out.
This is called patch-2.2.0-pre9-parportpc, and is also available at
ftp://ftp.torque.net/pub/parport.
Tim.
*/
--- /big/linux-2.2.0-pre9/drivers/misc/parport_pc.c Sun Jan 3 13:34:30 1999
+++ linux/drivers/misc/parport_pc.c Fri Jan 22 08:47:00 1999
@@ -378,34 +378,35 @@
*/
static int parport_ECR_present(struct parport *pb)
{
- unsigned char r, octr = parport_pc_read_control(pb);
- unsigned char oecr = parport_pc_read_econtrol(pb);
- unsigned char tmp;
+ unsigned char r;

+ parport_pc_write_control (pb, 0xc);
r = parport_pc_read_control(pb);
if ((parport_pc_read_econtrol(pb) & 0x3) == (r & 0x3)) {
parport_pc_write_control(pb, r ^ 0x2 ); /* Toggle bit 1 */

r = parport_pc_read_control(pb);
- if ((parport_pc_read_econtrol(pb) & 0x2) == (r & 0x2)) {
- parport_pc_write_control(pb, octr);
- return 0; /* Sure that no ECR register exists */
- }
+ if ((parport_pc_read_econtrol(pb) & 0x2) == (r & 0x2))
+ goto no_reg; /* Sure that no ECR register exists */
}

if ((parport_pc_read_econtrol(pb) & 0x3 ) != 0x1)
- return 0;
+ goto no_reg;

parport_pc_write_econtrol(pb, 0x34);
- tmp = parport_pc_read_econtrol(pb);
+ if (parport_pc_read_econtrol(pb) != 0x35)
+ goto no_reg;

- parport_pc_write_econtrol(pb, oecr);
- parport_pc_write_control(pb, octr);
-
- if (tmp != 0x35)
- return 0;
+ parport_pc_write_control(pb, 0xc);

+ /* Go to mode 000; SPP, reset FIFO */
+ parport_pc_frob_econtrol (pb, 0xe0, 0x00);
+
return PARPORT_MODE_PCECR;
+
+ no_reg:
+ parport_pc_write_control (pb, 0xc);
+ return 0;
}

static int parport_ECP_supported(struct parport *pb)
@@ -706,14 +707,13 @@

static int probe_one_port(unsigned long int base, int irq, int dma)
{
- struct parport tmpport, *p;
+ unsigned int modes;
+ struct parport tmpport, *p = &tmpport;
int probedirq = PARPORT_IRQ_NONE;
if (check_region(base, 3)) return 0;
tmpport.base = base;
tmpport.ops = &parport_pc_ops;
- if (!(parport_SPP_supported(&tmpport))) return 0;
- if (!(p = parport_register_port(base, irq, dma, &parport_pc_ops))) return 0;
- p->modes = PARPORT_MODE_PCSPP | parport_PS2_supported(p);
+ tmpport.modes = 0;
if (p->base != 0x3bc) {
if (!check_region(base+0x400,3)) {
p->modes |= parport_ECR_present(p);
@@ -725,6 +725,13 @@
p->modes |= parport_ECPEPP_supported(p);
}
}
+ if (!parport_SPP_supported(p))
+ /* No port. */
+ return 0;
+ modes = p->modes | PARPORT_MODE_PCSPP | parport_PS2_supported(p);
+ if (!(p = parport_register_port(base, irq, dma, &parport_pc_ops)))
+ return 0;
+ p->modes = modes;
p->size = (p->modes & (PARPORT_MODE_PCEPP
| PARPORT_MODE_PCECPEPP))?8:3;
printk(KERN_INFO "%s: PC-style at 0x%lx", p->name, p->base);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/
Re: [patch] parport problems [ In reply to ]
Tim Waugh wrote:
>
> Okay, I'm now quite hopeful that this patch will fix the problems that
> people are seeing. I ran into "insmod parport_pc wouldn't work" just now,
> and this sorted everything out.
>
> This is called patch-2.2.0-pre9-parportpc, and is also available at
> ftp://ftp.torque.net/pub/parport.
>
> Tim.
Tim,
I have problems since upgrading from 2.2.0-pre7 to -pre8, and
also with 2.2.0-final and your patch. In 2.2.0-pre7, all ran fine.
I am running a new glibc-based SuSE-Linux 6.0 with plp 4.1.2.
Hardware is Gigabyte 686BX, 128M RAM, Parallel port ist configured
with EPP/ECP, (Ox378, irq 7). Printer is a Laserjet 6L.
Can you help me, please?
Regards,
Gerry
----------------------------------------------------------------------------------
dogmatix:/usr/src/linux/Documentation # vi /etc/conf.modules
alias parport_lowlevel parport_pc
# options parport io=0x378 irq=7

dogmatix:/usr/src/linux/Documentation # modprobe lp
Jan 22 15:07:52 dogmatix kernel: parport0: PC-style at 0x378
[SPP,ECP,ECPEPP,ECPPS2]
Jan 22 15:07:52 dogmatix kernel: parport0: detected irq 7; use procfs to
enable
interrupt-driven operation.
Jan 22 15:07:52 dogmatix kernel: parport0: no IEEE-1284 device present.
Jan 22 15:07:52 dogmatix kernel: lp0: using parport0 (polling).
dogmatix:/usr/src/linux/Documentation # cat /proc/modules
parport_probe 2884 0 (autoclean)
parport_pc 5012 1 (autoclean)
lp 5116 0 (unused)
parport 6788 1 [parport_probe parport_pc lp]
dogmatix:/usr/src/linux/Documentation # /sbin/init.d/lpd start
Starting lpdPLP lpd-daemon, version 4.1.2
dogmatix:/usr/src/linux/Documentation # lpr /home/gerd/netscape.ps
Your print job has been sent to printer 'lp', job 44, rank: active.
Jan 22 15:09:46 dogmatix lpd[508]: local_dojob: lp: printing job 44 for
root@dogmatix.fuenet, 18154 bytes
Jan 22 15:09:46 dogmatix lpd[508]: lp: 1 copy of /home/gerd/netscape.ps,
18154 bytes
[nothing happens...]
dogmatix:/usr/src/linux/Documentation # lpc status lp
lp:
queuing is enabled
printing is enabled
no entries
no daemon present
dogmatix:/usr/src/linux/Documentation # ls -l
/var/spool/lpd/ljet4l-a4-auto-mono-300/
total 5
drwxr-xr-x 2 lp lp 1024 Jan 22 15:09 .
drwxr-xr-x 7 lp lp 1024 Jan 4 17:53 ..
-rw------- 1 lp staff 19 Jan 22 15:09
.seq.dogmatix.fuenet
-rw-r----- 1 lp lp 0 Jan 4 17:52 acct
-rw-r----- 1 lp lp 0 Jan 22 15:09 lock
-rw-r----- 1 lp lp 1017 Jan 22 15:09 log
-rw-r----- 1 lp lp 38 Jan 22 15:09 status
dogmatix:/usr/src/linux/Documentation # less

/var/spool/lpd/ljet4l-a4-auto-mono-300/log
%%[ Error: invalidfileaccess; OffendingCommand: .outputpage ]%%
Unexpected interpreter error -9.
Error object: (f80)op(342:.outputpage)0x80847bc
Operand stack at 0x81542a0:
0x8157a74: 0x0b int --F------ 0x0000 0x00000001 = 1
0x8157a7c: 0x01 bool --F------ 0x0000 0x08120001 = true
Execution stack at 0x8154300:
0x81593dc: 0x0f oper --F---e-- 0x0000 0x08070664 = %interp_exit
0x81593e4: 0x12 str --F-rxe-- 0x0000 0x00000000 =
0x81593ec: 0x03 file --L-rxe-- 0x0001 0x08188478
0x81593f4: 0x0e null --F---e-- 0x0000 0x0807b114
0x81593fc: 0x03 file --S-rxe-- 0x0001 0x0815d3a8
0x8159404: 0x0f oper --F---e-- 0x0000 0x0807b0d0 = %runexec_finish
0x815940c: 0x03 file --S-rxe-- 0x0001 0x0815d3a8
0x8159414: 0x05 mpry --G-rxe-- 0x0002 0x0817805a
0x815941c: 0x05 mpry --G-rxe-- 0x0003 0x08178040
0x8159424: 0x05 mpry --G-rxe-- 0x0039 0x081786c6
Dictionary stack at 0x8154200:
0x8159c0c: 0x02 dict --Gwrx--- 0x0000 0x0816dddc
0x8159c14: 0x02 dict --Gwrx--- 0x0000 0x081c16f8
0x8159c1c: 0x02 dict --Lwrx--- 0x0000 0x081866c0
dogmatix:/usr/src/linux/Documentation # ls -l /dev/lp0
crw-rw--w- 1 root lp 6, 0 Dec 11 18:20 /dev/lp0
------------------------------------------------------------
Next try:
options parport io=0x378 irq=7
dogmatix:/usr/src/linux/Documentation # modprobe lp
/lib/modules/2.2.0-final/misc/parport.o: invalid parameter io
parport: No such file or directory
Next try:
options parport irq=7
dogmatix:/usr/src/linux/Documentation # modprobe lp
/lib/modules/2.2.0-final/misc/parport.o: invalid parameter irq
parport: No such file or directory
dogmatix:/usr/src/linux/Documentation # less parport.txt
[...]
KMod
----
If you use kmod, you will find it useful to edit /etc/conf.modules.
Here is an example of the lines that need to be added:
alias parport_lowlevel parport_pc
options parport_pc io=0x378,0x278 irq=7,auto
KMod will then automatically load parport_pc (with the options
"io=0x378,0x278 irq=7,auto") whenever a parallel port device driver
(such as lp) is loaded.
Uh?
--
Gerhard Fuellgrabe Phone: +49.5323.96788 Fax: 962044
Arnikaweg 34 E-mail: gerd@cacofonix.harz.de
D-38678 Clausthal-Zellerfeld Ham-Radio: DK3NZ@DB0NHM.#NDS.DEU.EU
http://www.harz.de/home/fuellgrabe
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/
Re: [patch] parport problems [ In reply to ]
On Fri, 22 Jan 1999, Gerhard Fuellgrabe wrote:
> dogmatix:/usr/src/linux/Documentation # /sbin/init.d/lpd start
>
> Starting lpdPLP lpd-daemon, version 4.1.2
strace this process. Find out why it dies.
> options parport io=0x378 irq=7
^^^
> dogmatix:/usr/src/linux/Documentation # less parport.txt
>
> [...]
> KMod
> ----
>
> If you use kmod, you will find it useful to edit /etc/conf.modules.
> Here is an example of the lines that need to be added:
>
> alias parport_lowlevel parport_pc
> options parport_pc io=0x378,0x278 irq=7,auto
^^^
I think you meant:
options parport_pc io=0x378 irq=7
Tim.
*/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/
Re: [patch] parport problems [ In reply to ]
This is a multi-part message in MIME format.
--------------78F33BB7769520079C5E2B08
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Tim Waugh wrote:
>
> On Fri, 22 Jan 1999, Gerhard Fuellgrabe wrote:
>
> > dogmatix:/usr/src/linux/Documentation # /sbin/init.d/lpd start
> >
> > Starting lpdPLP lpd-daemon, version 4.1.2
>
> strace this process. Find out why it dies.
After starting the lpd I can find with ps aux:
root 1368 0.0 0.5 1348 696 ? S 22:18 0:00 lpd:
accepting connections
but
lp:
queuing is enabled
printing is enabled
1 entry in spool area
no daemon present
Trying to print something:
Jan 22 22:35:12 dogmatix kernel: parport0: PC-style at 0x378, irq 7
[SPP,ECP,ECPEPP,ECPPS2]
Jan 22 22:35:12 dogmatix kernel: parport0: no IEEE-1284 device present.
Jan 22 22:35:12 dogmatix kernel: lp0: using parport0 (interrupt-driven).
Jan 22 22:35:12 dogmatix lpd[1428]: local_dojob: lp: printing job 45 for
root@dogmatix.fuenet, 2818 bytes
Jan 22 22:35:12 dogmatix lpd[1428]: lp: 1 copy of /etc/hosts, 2818 bytes
Jan 22 22:35:13 dogmatix lpd[1428]: local_dojob: lp: printing job 46 for
root@dogmatix.fuenet, 2818 bytes
Jan 22 22:35:13 dogmatix lpd[1428]: lp: 1 copy of /etc/hosts, 2818 bytes
In /var/spool/lpd/lj4l-a4-auto-mono-300/log:
[Total: 1 page on 1 sheet]
%%[ Error: invalidfileaccess; OffendingCommand: .outputpage ]%%
Unexpected interpreter error -9.
Error object: (f80)op(342:.outputpage)0x80847bc
Operand stack at 0x81542a0:
0x8157a74: 0x0b int --F------ 0x001c 0x00000001 = 1
0x8157a7c: 0x01 bool --F------ 0x0000 0x08120001 = true
Execution stack at 0x8154300:
0x81593dc: 0x0f oper --F---e-- 0x0000 0x08070664 = %interp_exit
0x81593e4: 0x12 str --F-rxe-- 0x0000 0x00000000 =
0x81593ec: 0x03 file --L-rxe-- 0x0001 0x08188678
0x81593f4: 0x0e null --F---e-- 0x0000 0x0807b114
0x81593fc: 0x03 file --S-rxe-- 0x0001 0x0815d3a8
0x8159404: 0x0f oper --F---e-- 0x0000 0x0807b0d0 = %runexec_finish
0x815940c: 0x03 file --S-rxe-- 0x0001 0x0815d3a8
0x8159414: 0x05 mpry --G-rxe-- 0x0002 0x0817ab06
0x815941c: 0x05 mpry --G-rxe-- 0x0003 0x0817aaec
0x8159424: 0x05 mpry --G-rxe-- 0x0039 0x0817b172
Dictionary stack at 0x8154200:
0x8159c0c: 0x02 dict --Gwrx--- 0x0000 0x0816dddc
0x8159c14: 0x02 dict --Gwrx--- 0x0000 0x081c16f8
0x8159c1c: 0x02 dict --Lwrx--- 0x0000 0x081866c0
0x8159c24: 0x02 dict --Lwrx--- 0x0000 0x0818890c
>
> > options parport io=0x378 irq=7
> I think you meant:
>
> options parport_pc io=0x378 irq=7
Sorry, a typo :-(
Regards,
Gerry
--
Gerhard Fuellgrabe Phone: +49.5323.96788 Fax: 962044
Arnikaweg 34 E-mail: gerd@cacofonix.harz.de
D-38678 Clausthal-Zellerfeld Ham-Radio: DK3NZ@DB0NHM.#NDS.DEU.EU
http://www.harz.de/home/fuellgrabe
--------------78F33BB7769520079C5E2B08
Content-Type: text/plain; charset=us-ascii;
name="strace.lpd"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="strace.lpd"
execve("/usr/bin/lpd", ["/usr/bin/lpd"], [/* 44 vars */]) = 0
brk(0) = 0x809f864
open("/etc/ld.so.preload", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat(3, {st_mode=0, st_size=0, ...}) = 0
mmap(0, 29284, PROT_READ, MAP_PRIVATE, 3, 0) = 0x4000d000
close(3) = 0
open("/lib/libresolv.so.2", O_RDONLY) = 3
mmap(0, 4096, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40015000
munmap(0x40015000, 4096) = 0
mmap(0, 63688, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40015000
mprotect(0x40021000, 14536, PROT_NONE) = 0
mmap(0x40021000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0xb000) = 0x40021000
mmap(0x40023000, 6344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x40023000
close(3) = 0
open("/lib/libnsl.so.1", O_RDONLY) = 3
mmap(0, 4096, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40025000
munmap(0x40025000, 4096) = 0
mmap(0, 26788, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40025000
mprotect(0x4002b000, 2212, PROT_NONE) = 0
mmap(0x4002b000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x5000) = 0x4002b000
close(3) = 0
open("/lib/libc.so.6", O_RDONLY) = 3
mmap(0, 4096, PROT_READ, MAP_PRIVATE, 3, 0) = 0x4002c000
munmap(0x4002c000, 4096) = 0
mmap(0, 706992, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x4002c000
mprotect(0x400c6000, 76208, PROT_NONE) = 0
mmap(0x400c6000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x99000) = 0x400c6000
mmap(0x400cc000, 51632, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x400cc000
close(3) = 0
munmap(0x4000d000, 29284) = 0
personality(PER_LINUX) = 0
getpid() = 1380
getuid() = 0
geteuid() = 0
setreuid(0, 0) = 0
brk(0) = 0x809f864
brk(0x809f884) = 0x809f884
brk(0x80a0000) = 0x80a0000
getrlimit(RLIMIT_NOFILE, {rlim_cur=1024, rlim_max=1024}) = 0
close(3) = -1 EBADF (Bad file descriptor)
getrlimit(RLIMIT_NOFILE, {rlim_cur=1024, rlim_max=1024}) = 0
close(4) = -1 EBADF (Bad file descriptor)
[...]
getrlimit(RLIMIT_NOFILE, {rlim_cur=1024, rlim_max=1024}) = 0
close(1023) = -1 EBADF (Bad file descriptor)
getrlimit(RLIMIT_NOFILE, {rlim_cur=1024, rlim_max=1024}) = 0
open("/dev/null", O_RDWR) = 3
close(3) = 0
umask(077) = 022
sigaction(SIGCHLD, {0x8063220, [], SA_STACK|0x494b6}, {SIG_DFL}) = 0
open("/etc/plp.conf", O_RDONLY) = 3
fstat(3, {st_mode=0, st_size=0, ...}) = 0
mmap(0, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x4000d000
read(3, "architecture linux\nuser lp\nfil"..., 4096) = 195
read(3, "", 4096) = 0
close(3) = 0
munmap(0x4000d000, 4096) = 0
open("/etc/nsswitch.conf", O_RDONLY) = 3
brk(0x80a1000) = 0x80a1000
fstat(3, {st_mode=0, st_size=0, ...}) = 0
mmap(0, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x4000d000
read(3, "passwd: db files nis\nshadow: db"..., 4096) = 306
read(3, "", 4096) = 0
close(3) = 0
munmap(0x4000d000, 4096) = 0
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat(3, {st_mode=0, st_size=0, ...}) = 0
mmap(0, 29284, PROT_READ, MAP_PRIVATE, 3, 0) = 0x4000d000
close(3) = 0
open("/lib/libnss_db.so.1", O_RDONLY) = 3
mmap(0, 4096, PROT_READ, MAP_PRIVATE, 3, 0) = 0x400d9000
munmap(0x400d9000, 4096) = 0
mmap(0, 24496, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x400d9000
mprotect(0x400de000, 4016, PROT_NONE) = 0
mmap(0x400de000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x4000) = 0x400de000
close(3) = 0
open("/lib/libdb.so.2", O_RDONLY) = 3
mmap(0, 4096, PROT_READ, MAP_PRIVATE, 3, 0) = 0x400df000
munmap(0x400df000, 4096) = 0
mmap(0, 63940, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x400df000
mprotect(0x400ee000, 2500, PROT_NONE) = 0
mmap(0x400ee000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0xe000) = 0x400ee000
close(3) = 0
open("/lib/libnss_files.so.1", O_RDONLY) = 3
mmap(0, 4096, PROT_READ, MAP_PRIVATE, 3, 0) = 0x400ef000
munmap(0x400ef000, 4096) = 0
mmap(0, 37924, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x400ef000
mprotect(0x400f8000, 1060, PROT_NONE) = 0
mmap(0x400f8000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x8000) = 0x400f8000
close(3) = 0
munmap(0x4000d000, 29284) = 0
open("/var/db/passwd.db", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/passwd", O_RDONLY) = 3
fcntl(3, F_GETFD) = 0
fcntl(3, F_SETFD, FD_CLOEXEC) = 0
fstat(3, {st_mode=0, st_size=0, ...}) = 0
mmap(0, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x4000d000
read(3, "root:x:0:0:root:/root:/bin/bash\n"..., 4096) = 1600
close(3) = 0
munmap(0x4000d000, 4096) = 0
brk(0x80a2000) = 0x80a2000
open("/var/db/group.db", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/group", O_RDONLY) = 3
fcntl(3, F_GETFD) = 0
fcntl(3, F_SETFD, FD_CLOEXEC) = 0
fstat(3, {st_mode=0, st_size=0, ...}) = 0
mmap(0, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x4000d000
read(3, "root:x:0:root\nbin:x:1:root,bin,"..., 4096) = 475
close(3) = 0
munmap(0x4000d000, 4096) = 0
uname({sys="Linux", node="dogmatix", ...}) = 0
gettimeofday({917039979, 809112}, NULL) = 0
getpid() = 1380
open("/etc/resolv.conf", O_RDONLY) = 3
fstat(3, {st_mode=S_ISVTX|070, st_size=0, ...}) = 0
mmap(0, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x4000d000
read(3, "#\n# /etc/resolv.conf\n#\n# Auto"..., 4096) = 265
read(3, "", 4096) = 0
close(3) = 0
munmap(0x4000d000, 4096) = 0
open("/etc/hosts", O_RDONLY) = 3
fcntl(3, F_GETFD) = 0
fcntl(3, F_SETFD, FD_CLOEXEC) = 0
fstat(3, {st_mode=S_ISVTX|050, st_size=0, ...}) = 0
mmap(0, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x4000d000
read(3, "#\n# hosts\t\tThis file describe"..., 4096) = 2818
close(3) = 0
munmap(0x4000d000, 4096) = 0
sigaction(SIGPIPE, {SIG_IGN}, {SIG_DFL}) = 0
sigaction(SIGHUP, {0x804f280, [], SA_STACK|0x8341c}, {SIG_DFL}) = 0
sigaction(SIGINT, {0x804edc0, [], SA_STACK|0x494b6}, {SIG_DFL}) = 0
sigaction(SIGQUIT, {0x804edc0, [], SA_NOMASK|0x4bd6}, {SIG_DFL}) = 0
sigaction(SIGTERM, {0x804edc0, [], SA_NOMASK|0x340e0}, {SIG_DFL}) = 0
fstat(1, {st_mode=S_ISVTX|0410, st_size=0, ...}) = 0
mmap(0, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x4000d000
ioctl(1, TCGETS, {B9600 opost isig icanon echo ...}) = 0
write(1, "PLP lpd-daemon, version 4.1.2\n", 30) = 30
time(NULL) = 917039979
open("/var/spool/lpd/lock.dogmatix", O_RDWR|O_CREAT, 0644) = 3
fcntl(3, F_GETFL) = 0x2 (flags O_RDWR)
fstat(3, {st_mode=0, st_size=0, ...}) = 0
mmap(0, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x4000e000
lseek(3, 0, SEEK_CUR) = 0
fstat(3, {st_mode=0, st_size=0, ...}) = 0
read(3, "1368\nJan 22 22:18:10\n", 4096) = 21
fcntl(3, F_SETLK, {type=F_WRLCK, whence=SEEK_SET, start=0, len=0}) = -1 EAGAIN (Resource temporarily unavailable)
close(3) = 0
munmap(0x4000e000, 4096) = 0
write(1, "Active PLP lpd, pid 1368\n", 25) = 25
munmap(0x4000d000, 4096) = 0
_exit(1) = ?
--------------78F33BB7769520079C5E2B08--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/
Re: Should raw I/O be added to the kernel? [ In reply to ]
On Fri, 22 Jan 1999, Stephen C. Tweedie wrote:
> Hi,
>
> On Thu, 21 Jan 1999 21:39:26 +0100 (MET), Gerard Roudier
> <groudier@club-internet.fr> said:
>
> > Providing integrity using only a synchronous IO semantic is so costly for
> > performances that I donnot even want to think for a second to such an
> > approach.
>
> Interesting to hear you say this, since that is _precisely_ what you get
> if you are running a large DB like Oracle or Informix on raw devices.
> All raw devices are _necessarily_ synchronous, and yet these devices are
> suggested as a means of improving performance.
The reason it improves performance is, IMO, that this eliminates a useless
memory copy and the kernel caching that may have adverse effects for such
applications instead of optimizing IO througput.
It is not a real optimization, in my opinion, we just need to eliminates
kernel IO optimizations since they are defeated by the way DB are doing
IOs from user-land.
Implementing data caching from user-land may have the following cost, IMO:
- It increases the actual IO latency from the application to the device.
- Due to the increase of latency, you may need to use large caching and
complex optimization algorithms/heuritics in order not to be too bad.
This wastes memory and CPU.
Using synchronous writes may reduce the average number of SCSI sommands
the drive will be fed with at a time and so prevents the drive from
optimizing IO based on actual head and angular positions.
If you want not to be too bad you may also need to implement some complex
thing for that in user-land that also wastes resources.
The lower the IO latency is, the less you need complex caching and complex
optimization heuristics to implement.
If you add on top of a data base manager some usually bad application
implemented by programmers that donnot have any idea on how the thing
actually works and you get something that need several order of magnitude
more ressources than traditional applications.
In order to make things still worse, you may add a RAID controller at the
bottom of that pile of **** that still may increase significantly the
actual IO latency.
> > With 'full control' I meant 'full control on actual IO ordering
> > requirements to maintain integrity and consistency. I want to think of an
> > IO sub-system that allows to ask for 'ordering' requirements of the
> > reality of IOs.
>
> Absolutely, there's no doubt about this. The only problem is that the
> Unix API does not allow it.
Agreed, I did mention that too.
> The nearest we can get is asynchronous IO
> (using posix.4 libaio) along with synchronous status returns: in other
> words, the writes are asynchronous but the completion status is not
> returned until the data has positively hit disk.
Indeed, this may help.
Regards,
Gerard.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/
Re: [patch] parport problems [ In reply to ]
On Fri, 22 Jan 1999, Gerhard Fuellgrabe wrote:
> In /var/spool/lpd/lj4l-a4-auto-mono-300/log:
>
> [Total: 1 page on 1 sheet]
> %%[ Error: invalidfileaccess; OffendingCommand: .outputpage ]%%
> Unexpected interpreter error -9.
If the file access error was -9 (errno), that's -EBADF. Please try to get
strace output of this -- strace -f the printer daemon.
Tim.
*/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/
Re: userspace access to "u8", "u16", etc. types with filter.h [ In reply to ]
from the quill of "Khimenko Victor" <khim@sch57.msk.ru> on scroll
<ABCSTgsuK0@khim.sch57.msk.ru>
>
> Copy needed structures to your program and ask glibc folks to add
> definition
> in next glibc version.
Wow! Really? I guess I am surprised something as O/S specific as LPF
would have any interface in the libc. Is it really libc's job to
provide O/S specific interfaces? I guess libc would be a huge beast
with lots of O/S specific macros in that case, yes?
> In glibc. Ask glibc folks to add it. While it's not added just copy
> structure to you program. BTW glibc folks could change definition (for
> example UID is 16bit in kernel now, but 32bit in glibc) and add
> wrapper
> for syscall -- when this will be done you'll redo your program...
OK.
b.
--
Brian J. Murrell InterLinx Support Services, Inc.
North Vancouver, B.C. 604 983 UNIX
Platform and Brand Independent UNIX Support - R3.2 - R4 - BSD
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/