Re: make COMPAT_LINUX match SYSV binaries

2020-10-21 Thread Eduardo Horvath
On Wed, 21 Oct 2020, co...@sdf.org wrote: > In the event someone adds support for another OS with this problem (say, > modern Solaris), I don't expect this compat to be enabled by default, > for security reasons. So the problem will only occur if a user enables > both forms of compat at the same

Re: Straw proposal: MI kthread vector/fp unit API

2020-06-22 Thread Eduardo Horvath
On Mon, 22 Jun 2020, Taylor R Campbell wrote: > > Date: Mon, 22 Jun 2020 18:45:47 + (UTC) > > From: Eduardo Horvath > > > > I think this is sort of a half-measure since it restricts > > coprocessor usage to a few threads. If you want to say, implement >

Re: Straw proposal: MI kthread vector/fp unit API

2020-06-22 Thread Eduardo Horvath
On Sat, 20 Jun 2020, Taylor R Campbell wrote: > Here's a straw proposal for an MI API to allow a kthread to use any > vector or floating-point unit on the CPU -- call it the `FPU' for > brevity. Description elided. > Thoughts? I think this is sort of a half-measure since it restricts

Re: Am I using bus_dma right?

2020-04-24 Thread Eduardo Horvath
You missed the most important part of my response: On Fri, 24 Apr 2020, Eduardo Horvath wrote: > > > So I have to treat it like a DMA write even if there is never any > > write-direction DMA actually going on? > > Yes. > > > Then the problem *probably* is not bus_dma botchery. Eduardo

Re: Am I using bus_dma right?

2020-04-24 Thread Eduardo Horvath
On Thu, 23 Apr 2020, Mouse wrote: > Okay, here's the first problem. There is no clear "transaction > completes". Let's clarify that. > The card has a DMA engine on it (a PLX9080, on the off chance you've > run into it before) that can DMA into chained buffers. I set it up > with a ring of

Re: Am I using bus_dma right?

2020-04-23 Thread Eduardo Horvath
Let me try to simplify these concepts. On Thu, 23 Apr 2020, Mouse wrote: > I'm not doing read/write DMA. DMA never transfers from memory to the > device. (Well, I suppose it does to a small extent, in that the device > reads buffer descriptors. But the buffer descriptors are set up once >

Re: RFC: New userspace fetch/store API

2019-02-25 Thread Eduardo Horvath
On Mon, 25 Feb 2019, Andrew Cagney wrote: > On Mon, 25 Feb 2019 at 11:35, Eduardo Horvath wrote: > > > > On Sat, 23 Feb 2019, Jason Thorpe wrote: > > > > > int ufetch_8(const uint8_t *uaddr, uint8_t *valp); > > > int ufetch_16(const uint

Re: RFC: New userspace fetch/store API

2019-02-25 Thread Eduardo Horvath
On Sat, 23 Feb 2019, Jason Thorpe wrote: > int ufetch_8(const uint8_t *uaddr, uint8_t *valp); > int ufetch_16(const uint16_t *uaddr, uint16_t *valp); > int ufetch_32(const uint32_t *uaddr, uint32_t *valp); > #ifdef _LP64 > int ufetch_64(const uint64_t *uaddr, uint64_t *valp); >

Re: Missing compat_43 stuff for netbsd32?

2018-09-11 Thread Eduardo Horvath
On Tue, 11 Sep 2018, Paul Goyette wrote: > While working on the compat code, I noticed that there are a few old > syscalls which are defined in syc/compat/netbsd323/syscalls.master > with a type of COMPAT_43, yet there does not exist any compat_netbsd32 > implementation as far as I can see... >

re: Kernel module framework status?

2018-05-04 Thread Eduardo Horvath
On Fri, 4 May 2018, matthew green wrote: > John Nemeth writes: > > On May 3, 10:54pm, Mouse wrote: > > } > > } > There is also the idea of having a module specify the device(s) > > } > it handles by vendor:product > > } > > } Isn't that rather restrictive in what buses it permits

Re: amd64: svs

2018-01-11 Thread Eduardo Horvath
On Thu, 11 Jan 2018, Martin Husemann wrote: > On Thu, Jan 11, 2018 at 08:14:59PM +0100, Jaromír Dole?ek wrote: > > Okay, I'll look into this. The feature seems pretty simple to use, though > > it will need > > some care to allow inactive processes to relinguish PCID when there is > > shortage. >

Re: uvm page coloring for cache aliasing

2017-12-26 Thread Eduardo Horvath
On Sat, 23 Dec 2017, co...@sdf.org wrote: > Hi folks, > > as I understand, a reason to have page coloring is extra broken MIPS > hardware which has cache aliasing issues unless a large page size > is used. picking the same color avoids aliasing. Could be to work around cache aliasing, or it

Re: New line discipline flag to prevent userland open/close of the device

2017-10-30 Thread Eduardo Horvath
On Sun, 29 Oct 2017, Martin Husemann wrote: > Now for those devices we definitively do not want userland access to the com > device. This would be pretty easy if we add another flag to the tty > line disciplines t_state member, like TS_NO_USER_OPEN. Then we could > modify comclose like: > Does

Re: Access to DMA memory while DMA in progress?

2017-10-27 Thread Eduardo Horvath
On Fri, 27 Oct 2017, Mouse wrote: > >> But I'm not sure what sort of sync calls I need to make. [...] > > You want to do a bus_dmamap_sync(BUS_DMASYNC_POSTREAD) [...] > > In the NIC example above, you map the ring buffer with > > BUS_DMA_COHERENT, fill it up and do a > >

Re: how to tell if a process is 64-bit

2017-09-14 Thread Eduardo Horvath
On Thu, 14 Sep 2017, Martin Husemann wrote: > On Thu, Sep 14, 2017 at 02:31:29PM +0200, Thomas Klausner wrote: > > kp = kvm_getproc2(kvmp, KERN_PROC_PID, pid, sizeof(*kp), ); > > if (res != 1) > > exit(1); > > if (kp->p_flag & P_32) > printf("it is a 32bit

Re: how to tell if a process is 64-bit

2017-09-08 Thread Eduardo Horvath
On Fri, 8 Sep 2017, Mouse wrote: > >> ([...] on most "64-bit" ports, a real question on amd64 (and others, > >> if any) which support 32-bit userland.) > > actually -- our mips64 ports largely use N32 userland, which is 64 > > bit registers and 32 bit addresses. > > Oh! Thank you. Yes, that's

re: Can't compile NetBSD kernel in Virtual Box due to assym.h error

2017-07-05 Thread Eduardo Horvath
On Wed, 5 Jul 2017, matthew green wrote: > Robert Elz writes: > > Date:Tue, 04 Jul 2017 07:24:43 +0100 > > From:Robert Swindells > > Message-ID: > > > > | You are running NetBSD/amd64 but trying to build a

Re: ptrace(2) interface for hardware watchpoints (breakpoints)

2016-12-15 Thread Eduardo Horvath
On Thu, 15 Dec 2016, Andrew Cagney wrote: > Might a better strategy be to first get the registers exposed, and then, if > there's still time start to look at an abstract interface? That's one way of looking at it. Another way is to consider that watchpoints can be implemented through careful

Re: "Wire" definitions and __packed

2016-10-05 Thread Eduardo Horvath
On Wed, 5 Oct 2016, Roy Marples wrote: > On 04/10/2016 23:06, Joerg Sonnenberger wrote: > > I'd like to addressing this by cutting down on the first set. For this > > purpose, I want to replace many of the __packed attributes in the > > current network headers with CTASSERT of the proper size,

Re: What is the best layer/device for a write-back cache based in nvram?

2016-09-14 Thread Eduardo Horvath
On Wed, 14 Sep 2016, Edgar Fu? wrote: > > 2- In scattered writes contained in a same slice, it allows to reduce > > the number of writes. With RAID 5/6 there is a advantage, the parity > > is written only one time for several writes in the same slice, instead > > of one time for every write in

Re: IIs factible to implement full writes of strips to raid using NVRAM memory in LFS?

2016-08-18 Thread Eduardo Horvath
On Thu, 18 Aug 2016, David Holland wrote: > some quibbles: > > On Thu, Aug 18, 2016 at 05:24:53PM +, Eduardo Horvath wrote: > > And you should be able to roll back the > > filesystem to snapshots of any earlier synchronization points. > > In LFS t

Re: IIs factible to implement full writes of strips to raid using NVRAM memory in LFS?

2016-08-18 Thread Eduardo Horvath
On Thu, 18 Aug 2016, Jose Luis Rodriguez Garcia wrote: > On Thu, Aug 18, 2016 at 7:24 PM, Eduardo Horvath <e...@netbsd.org> wrote: > > > > LFS writes the metadata at the same time, in the same place as the data. > > No synchronous writes necessary. > > As I under

Re: IIs factible to implement full writes of strips to raid using NVRAM memory in LFS?

2016-08-18 Thread Eduardo Horvath
On Thu, 18 Aug 2016, Jose Luis Rodriguez Garcia wrote: > I would like to implement this in LFS: > > Write full stripes to RAID 5/6 from LFS using a NVRAM card or similar: > > For this, the segment would be written to a NVRAM card or similar. > When the full segment is written to the NVRAM card,

Re: UVM and the NULL page

2016-08-01 Thread Eduardo Horvath
On Mon, 1 Aug 2016, Joerg Sonnenberger wrote: > On Mon, Aug 01, 2016 at 04:46:34PM +0000, Eduardo Horvath wrote: > > > > I don't understand. If you can't enter the mapping into the TLB, who > > cares what UVM does? > > If UVM tries [0, n] and could have pick

Re: UVM and the NULL page

2016-08-01 Thread Eduardo Horvath
On Mon, 1 Aug 2016, Joerg Sonnenberger wrote: > I disagree. While it is nice to assert this property in the pmap, it is > the wrong place. First of all, all pmaps need to be audited, at least on > platforms with shared address space. It's not specific to x86. Second, > part of the problem is that

Re: UVM and the NULL page

2016-08-01 Thread Eduardo Horvath
On Sat, 30 Jul 2016, Thor Lancelot Simon wrote: > 1) amd64 partially shares VA space between the kernel and userland. It >is not unique in this but most architectures do not. FWIW all the pmaps I worked on have split user/kernel address spaces and do not share this vulnerability. Eduardo

Re: UVM and the NULL page

2016-08-01 Thread Eduardo Horvath
On Sat, 30 Jul 2016, Joerg Sonnenberger wrote: > For what it is worth, I do believe that the handling of the 0 page > should be part of UVM and not pmap. I am only objection to forcing it > unconditionally. I disagree. Based on the number of files you need to touch it's much better to

Re: UVM and the NULL page

2016-07-29 Thread Eduardo Horvath
On Fri, 29 Jul 2016, Maxime Villard wrote: > Anyway, the only thing I'm suggesting is doing it in amd64, so this is a > little off-topic. Yes, and if it's for amd64 it should be done in the pmap layer, not polluting the UVM layer all other architectures also use. Eduardo

Re: UVM and the NULL page

2016-07-28 Thread Eduardo Horvath
On Thu, 28 Jul 2016, Maxime Villard wrote: > Currently, there is no real way to make sure a userland process won't be > able to allocate the NULL page. There is this attempt [1], but it has two > major issues. I don't think this is a good idea. You should leave this to the pmap layer rather

Re: Scripting DDB in Forth?

2016-05-02 Thread Eduardo Horvath
On Mon, 2 May 2016, Valery Ushakov wrote: > On Mon, May 02, 2016 at 00:59:06 -0400, Michael wrote: > > > On Mon, 2 May 2016 04:59:32 +0300 > > Valery Ushakov wrote: > > > I thought it might be interesting to put it into the kernel so that > > > it can be hooked into DDB. >

Re: dbcool, envsys, powerd shutting down my machine

2016-02-04 Thread Eduardo Horvath
I really don't know why I'm keeping this discussion going. I doubt anyone else cares, but: On Wed, 3 Feb 2016, Constantine A. Murenin wrote: > On 2016-02-03 10:06, Eduardo Horvath wrote: > > On Tue, 2 Feb 2016, Constantine A. Murenin wrote: > > > > > Would

Re: dbcool, envsys, powerd shutting down my machine

2016-02-03 Thread Eduardo Horvath
On Tue, 2 Feb 2016, Constantine A. Murenin wrote: > Wouldn't the correct solution then be to kill the process-intensive jobs, > instead of shutting down the whole system? That doesn't really make too much sense. In theory, if the CPU has a low power mode and the machine detects thermal issues,

Re: Understanding SPL(9)

2015-08-31 Thread Eduardo Horvath
On Mon, 31 Aug 2015, Stephan wrote: > I´m trying to understand interrupt priority levels using the example > of x86. From what I´ve seen so far I´d say that all spl*() functions > end up in either splraise() or spllower() from > sys/arch/i386/i386/spl.S. What these functions actually do is not >

Re: VOP_PUTPAGE ignores mount_nfs -o soft,intr

2015-06-23 Thread Eduardo Horvath
On Tue, 23 Jun 2015, Emmanuel Dreyfus wrote: I note we have this in genfs_do_io(), and I suspect this is the same 2 value: if (iowrite) { mutex_enter(vp-v_interlock); vp-v_numoutput += 2; mutex_exit(vp-v_interlock); }

Re: bottom half

2015-06-19 Thread Eduardo Horvath
On Fri, 19 Jun 2015, Johnny Billquist wrote: On 2015-06-19 11:45, Edgar Fu?? wrote: Runs on kernel stack in kernel space is not the same thing as the Linux concept of bottom half. :-) I don't know what the Linux (or VMS or Windows) concept of nottom half is. I thought I knew what the

Re: mutex(9) on sparc64 RMO [was Re: pserialize(9) vs. TAILQ]

2014-11-25 Thread Eduardo Horvath
On Mon, 24 Nov 2014, Taylor R Campbell wrote: Date: Mon, 24 Nov 2014 16:44:41 + (UTC) From: Eduardo Horvath e...@netbsd.org I enhanced membar_ops with proper memory barriers and then was looking at the mutex code. Unfortunately, I didn't get very far. It seemed

Re: pserialize(9) vs. TAILQ

2014-11-24 Thread Eduardo Horvath
On Sun, 23 Nov 2014, Dennis Ferguson wrote: On 23 Nov, 2014, at 01:01 , Martin Husemann mar...@duskware.de wrote: On Sat, Nov 22, 2014 at 01:24:42PM +0800, Dennis Ferguson wrote: I'll guess one problem is in sparc/mutex.h, here: #define MUTEX_RECEIVE(mtx) /* nothing */

Re: pserialize(9) vs. TAILQ

2014-11-21 Thread Eduardo Horvath
On Fri, 21 Nov 2014, Dennis Ferguson wrote: On 21 Nov, 2014, at 00:22 , Eduardo Horvath e...@netbsd.org wrote: Or you could try to get the kernel to run on a SPARC V9 machine running with RMO memory ordering. There's a lot more of those around. I'm not convinced the existing APIs

Re: pserialize(9) vs. TAILQ

2014-11-20 Thread Eduardo Horvath
On Thu, 20 Nov 2014, Thor Lancelot Simon wrote: On Thu, Nov 20, 2014 at 01:05:05PM +0800, Dennis Ferguson wrote: find hardware which behaves like this to test on). I haven't heard anything one way or the other concerning support for MP Alphas, but the implicit message from the current

Re: fsck_lfs

2014-07-14 Thread Eduardo Horvath
You probably want to do some testing of the roll-forward code. Back when I was whacking on LFS I noticed that running fsck on a dirty filesystem appeared to cause more problems than it fixed. And running multiple passes caused even more damage. Eduardo On Sat, 12 Jul 2014, Konrad Schroder

Re: Making tmpfs reserved memory configurable

2014-06-05 Thread Eduardo Horvath
On Thu, 5 Jun 2014, Martin Husemann wrote: On Fri, May 30, 2014 at 04:56:01PM +0200, Martin Husemann wrote: I have been on a quest to make the stock vax install CD (-image) usable on VAX machines with 8 MB recently. (8 MB is the lowest I could persuade simh to emulate, for 4 MB we will

Re: Making tmpfs reserved memory configurable

2014-06-05 Thread Eduardo Horvath
On Thu, 5 Jun 2014, Martin Husemann wrote: On Thu, Jun 05, 2014 at 08:50:07AM -0700, Matt Thomas wrote: can you try using freetarg? Did that and it worked as well. Does freetarg ever change after boot? Maybe. It's set in uvmpd_tune(), which may be called by the page daemon in some

Re: Making tmpfs reserved memory configurable

2014-05-30 Thread Eduardo Horvath
On Fri, 30 May 2014, Martin Husemann wrote: See mount_tmpfs(8), in the paragraph about the -s option: Note that four megabytes are always reserved for the system and cannot be assigned to the file system. Now, with a 3.2 MB text GENERIC kernel and 8 MB RAM, we certainly don't have

Re: 4byte aligned com(4) and PCI_MAPREG_TYPE_MEM

2014-02-11 Thread Eduardo Horvath
On Tue, 11 Feb 2014, David Laight wrote: On Tue, Feb 11, 2014 at 04:19:26PM +, Eduardo Horvath wrote: We really should enhance the bus_dma framework to add bus_space-like accessor routines so we can implement something like this. Using bswap is a lousy way to implement byte

Re: [Milkymist port] virtual memory management

2014-02-10 Thread Eduardo Horvath
On Sun, 9 Feb 2014, Yann Sionneau wrote: Thank you for your answer Matt, Le 09/02/14 19:49, Matt Thomas a écrit : On Feb 9, 2014, at 10:07 AM, Yann Sionneau yann.sionn...@gmail.com wrote: Since the kernel runs with MMU on, using virtual addresses, it cannot dereference physical

Re: SAS tape drives

2013-12-11 Thread Eduardo Horvath
On Wed, 11 Dec 2013, Mark Davies wrote: On Wed, 11 Dec 2013, Eduardo Horvath wrote: Last time I fiddled around with the LSI MegaRAID stack it did not provide any sort of transparent access to attached devices. Can you create a LUN with the tape device? You might have more success

Re: SAS tape drives

2013-12-10 Thread Eduardo Horvath
On Wed, 11 Dec 2013, Mark Davies wrote: Are SAS tape drives supported in NetBSD? I have an LSI MegaRAID SAS card with an HP LTO5 SAS drive attached. The card's WebBIOS can see the tape attached and NetBSD can see the LSI card but NetBSD show no evidence of seeing the tape drive (not

Re: posix_fallocate

2013-11-19 Thread Eduardo Horvath
On Tue, 19 Nov 2013, Christoph Badura wrote: On Mon, Nov 18, 2013 at 12:31:41PM +1100, matthew green wrote: i would buy this argument if mmap()ing a large sparse file and filling it up randomly (but with relatively large chunks at a time) did not lead to severely fragmented files that

Re: mpt device shuffling

2013-10-21 Thread Eduardo Horvath
On Sat, 19 Oct 2013, Edgar Fu? wrote: Strictly speaking, this is not a NetBSD kernel issue. However, I hope that someone more familiar with mpt(4) has come accross that MPT feature before: One additional oddity I faced with Thursday's disc failure was that after physically replacing the

Re: [Milkymist-devel] [Milkymist port] virtual memory management

2013-06-05 Thread Eduardo Horvath
On Wed, 5 Jun 2013, Yann Sionneau wrote: But I will definitely think about adding ASID as a first improvement to the MMU when everything will be working with the current design :) I don't see the point of making major architectural changes to the MMU incrementally. These features affect

Re: Using uvmhist without ddb?

2013-02-21 Thread Eduardo Horvath
On Thu, 21 Feb 2013, Brian Buhrow wrote: Hello. I'm working on an issue with NetBSD-5 that may involve a problem with error paths in uvm. I'd like to use the uvmhist facilities in NetBSD to see if I can help track the issue down. However, the machine on which I'm doing this work

Re: pmap_enter(9) rework

2013-02-01 Thread Eduardo Horvath
On Sat, 2 Feb 2013, Toru Nishimura wrote: I feel boring that pmap_enter(9) can not avoid to have goto jumps for the logic simplity. This indicates pmap_enter(9) is mistakenly designed and used for mulitple purposes in parallel. Rework is seriously requested.. I've always felt the p-v

Re: uvn_fp2 [was: Help with issue with mpt(4) driver]

2013-01-29 Thread Eduardo Horvath
On Mon, 28 Jan 2013, Brian Buhrow wrote: (gdb) print pg $1 = (struct vm_page *) 0xc40c4cd0 (gdb) print *pg $2 = {rb_node = {rb_nodes = {0x0, 0x0}, rb_info = 3275287704}, pageq = { queue = {tqe_next = 0xc338ec98, tqe_prev = 0xc1425ad4}, list = { le_next = 0xc338ec98, le_prev =

Re: uvn_fp2 [was: Help with issue with mpt(4) driver]

2013-01-28 Thread Eduardo Horvath
On Sun, 27 Jan 2013, Patrick Welche wrote: More details - so we now know that the page is BUSY. Sadly an attempt at a core dump to a separate disk failed and this is before I connect the serial port block to the motherboard... Cheers, Patrick PIDLID S CPU FLAGS STRUCT LWP *

Re: Help with issue with mpt(4) driver

2013-01-28 Thread Eduardo Horvath
On Sat, 26 Jan 2013, Brian Buhrow wrote: Hello. I believe Patrick may be on to something. Further investigation into my mpt(4) issues reveals that while there are still some steps I can take to make the mpt(4) driver more robust when it comes to recovering from LSI errors, I believe

Re: Help with issue with mpt(4) driver

2013-01-21 Thread Eduardo Horvath
On Mon, 21 Jan 2013, Patrick Welche wrote: I have just been experiencing filesystem lock-up with a process in uvn_fp2, so it may be unrelated to you mpt fiddling... That systems disks are on ahcisata. It can withstand builds of the world, but not GraphicsMagick: struct proc * fe81

Re: Help with issue with mpt(4) driver

2013-01-15 Thread Eduardo Horvath
On Mon, 14 Jan 2013, Brian Buhrow wrote: Hello. I'm working on some patches to make the LSI Fusion SCSI driver (mpt(4)) more robust. I'm making good progress, but I've run into a n issue that has momentarily baffled me. If I get a bunch of concurrent jobs running on a filesystem

Re: [RFC][PATCH] _UC_TLSBASE for all ports

2012-08-13 Thread Eduardo Horvath
On Sat, 11 Aug 2012, Matt Thomas wrote: On Aug 11, 2012, at 10:35 AM, Thor Lancelot Simon wrote: On Sat, Aug 11, 2012 at 06:45:12AM +, Christos Zoulas wrote: It is a slippery slope, but I think in this case it is wise to bend. If we cannot reach agreement here, consult core.

Re: SAS scsibus target numbering

2012-07-26 Thread Eduardo Horvath
On Thu, 26 Jul 2012, Edgar Fu? wrote: I have a (mpt) SAS with seven discs connected. The discs attach as sd0..sd6, but the SCSI target numbers are 0..5 and 7. It appears to me that someone is skippig ID 6 for the controller. It doesn't hurt too much, but it took me a while to find out why

Re: SAS scsibus target numbering

2012-07-26 Thread Eduardo Horvath
On Thu, 26 Jul 2012, Edgar Fu? wrote: You can change them arbitrarily by messing with mpt either from BIOS or their command line utilities. I tried the BIOS configuration (the one you get by typing Ctrl-C at the right time, but I couldn't anything to assign target IDs. Do you remember

Re: SAS scsibus target numbering

2012-07-26 Thread Eduardo Horvath
On Thu, 26 Jul 2012, Mouse wrote: it's usual for the SCSI HBA to assign a targetID for itself. For real SCSI - ie, non-SAS - it's actually necessary; the protocols used for initiators and targets to speak with one another require a line for the initiator as well as for the target. But the

Re: Syscall kill(2) called for a zombie process should return 0

2012-07-18 Thread Eduardo Horvath
On Wed, 18 Jul 2012, Mouse wrote: Subject: Re: Syscall kill(2) called for a zombie process should return 0 + if (p != NULL P_ZOMBIE(p)) { + mutex_exit(proc_lock); + return 0; + }

Re: software interrupts scheduling oddities

2012-07-05 Thread Eduardo Horvath
On Thu, 5 Jul 2012, David Young wrote: I'm using the SCHED_M2 scheduler, btw, on a uniprocessor. SCHED_M2 is kind of an arbitrary choice. I haven't tried SCHED_4BSD, yet, but I will. I'd recommend you try the BSD scheduler. It may give you better results, even though it has a little more

Re: Issues using KGDB on a Linux machine to debug NetBSD

2012-06-08 Thread Eduardo Horvath
On Fri, 8 Jun 2012, Israel Jacquez wrote: Hello, I'll make this short. I can't seem to get debugging support working even when following the guide: http://www.netbsd.org/docs/kernel/kgdb.html. Target: NetBSD 5.1.2 on the i386 port Remote: Debian GNU/Linux Kernel on target:

Re: raw/block device disc troughput

2012-05-25 Thread Eduardo Horvath
On Fri, 25 May 2012, Edgar Fu? wrote: Thanks for the most insightful explanation! Also keep in mind: Yes, sure. That's why I would have expected the raw device to outperform even at lower block sizes. No, for small block sizes the overhead of the copyin() is more than offset by the

Re: mlockall() and small memory systems

2012-05-24 Thread Eduardo Horvath
On Thu, 24 May 2012, Martin Husemann wrote: On Wed, May 23, 2012 at 07:15:41PM +0100, David Laight wrote: What are the default ulimit values? Good point. Page size is 4k, with 32MB the limits are # ulimit -a time (-t seconds) unlimited file (-f blocks )

Re: raw/block device disc troughput

2012-05-24 Thread Eduardo Horvath
On Thu, 24 May 2012, Edgar Fu? wrote: It seems that I have to update my understanding of raw and block devices for discs. Using a (non-recent) 6.0_BETA INSTALL kernel and an ST9146853SS 15k SAS disc behind an LSI SAS 1068E (i.e. mpt(4)), I did a dd if=/dev/zero od=/dev/[r]sd0b bs=nn,

Re: raw/block device disc troughput

2012-05-24 Thread Eduardo Horvath
On Thu, 24 May 2012, Edgar Fu? wrote: Keep in mind mpt uese a rather inefficient communication protocol and does tagged queuing. You mean the protocol the main CPU uses to communicate with an MPT adapter is inefficient? Or do you mean SAS is inefficient? The protocol used to communicate

Re: raw/block device disc troughput

2012-05-24 Thread Eduardo Horvath
On Thu, 24 May 2012, Thor Lancelot Simon wrote: On Thu, May 24, 2012 at 05:31:43PM +, Eduardo Horvath wrote: With large transfers (larger than MAXPHYS) the writes are split up into MAXPHYS chunks and the disk handles them in parallel, hence the performance increase even beyond

Re: RAIDframe performance vs. stripe size

2012-05-11 Thread Eduardo Horvath
On Fri, 11 May 2012, Edgar Fu? wrote: EF I have one process doing something largely resulting in meta-data EF reads (i.e. traversing a very large directory tree). Will the kernel EF only issue sequential reads or will it be able to parallelise, e.g. EF reading indirect blocks? GO I don't

Re: introduce device_is_attached()

2012-04-17 Thread Eduardo Horvath
On Tue, 17 Apr 2012, Christoph Egger wrote: On 04/16/12 19:37, David Young wrote: I'm not sure I fully understand the purpose of amdnb_miscbus. Are all of the functions that do/will attach at amdnb_miscbus configuration-space only functions, or are they something else? Please explain

Re: making kmem more efficient

2012-03-01 Thread Eduardo Horvath
On Thu, 1 Mar 2012, Lars Heidieker wrote: Hi, this splits the lookup table into two parts, for smaller allocations and larger ones this has the following advantages: - smaller lookup tables (less cache line pollution) - makes large kmem caches possible currently up to min(16384,

Re: making kmem more efficient

2012-03-01 Thread Eduardo Horvath
On Thu, 1 Mar 2012, Lars Heidieker wrote: On 03/01/2012 06:04 PM, Eduardo Horvath wrote: On Thu, 1 Mar 2012, Lars Heidieker wrote: Hi, this splits the lookup table into two parts, for smaller allocations and larger ones this has the following advantages: - smaller lookup

Re: extattr namespaces

2012-02-06 Thread Eduardo Horvath
On Mon, 6 Feb 2012, Emmanuel Dreyfus wrote: Here is public disuccsion about extended attributs namespaces, following a private request from yamt@ We ahve two extended attributes API in tree: one from FreeBSD and one from Linux. We are about to toss the FreeBSD one in favor of the Linux

Re: RFC: New bus_space routine: bus_space_sync

2012-01-20 Thread Eduardo Horvath
On Thu, 19 Jan 2012, Matt Thomas wrote: For prefetchable regions (like framebuffers) mapped by bus_space_map, there is a need to able force the contents out of the cache back into memory (especially when the cache is a writeback cache). There is no MI way to do this with the bus_space

Re: RFC: New bus_space routine: bus_space_sync

2012-01-20 Thread Eduardo Horvath
On Fri, 20 Jan 2012, Mouse wrote: Even if originally intended for something else, [...] Why do you think BUS_SPACE_BARRIER_SYNC was intended for something else ? I can't see how a write barrier that doesn't ensure the write has reached the target (main or device memory) can be usefull.

Re: Why is it called strategy?

2011-10-18 Thread Eduardo Horvath
On Tue, 18 Oct 2011, Emmanuel Dreyfus wrote: As I understand, at VFS level, VOP_STRATEGY(9) is used for I/O to block devices. Where does that name comes from? Block devices use the `strategy()' routines to schedule operations because, unlike character devices which typically immediately post

Re: Implement mmap for PUD

2011-09-12 Thread Eduardo Horvath
On Sat, 10 Sep 2011, Masao Uebayashi wrote: On Sat, Sep 10, 2011 at 7:24 PM, Roger Pau Monné roger@entel.upc.edu wrote: PUD is a framework present in NetBSD that allows to implement character and block devices in userspace. I'm trying to implement a blktap [1] driver purely in

Re: Implement mmap for PUD

2011-09-09 Thread Eduardo Horvath
On Wed, 7 Sep 2011, Roger Pau Monné wrote: Basically we use pud_request to pass the request to the user-space server, and the server returns a memory address, allocated in the user-space memory of it's process. Then I try to read the value of the user space memory from the kernel, which works

Re: netbsd32 emulation in driver open() or read()

2011-08-30 Thread Eduardo Horvath
On Tue, 30 Aug 2011, Manuel Bouyer wrote: That may be nice to have, but won't help with my problem which is getting a N32 mips binary to talk to a N64 kernel. Hm, MIPS. In this case you may need to check the struct emul to differentiate o32 and n32. Or do they have the exact same structure

Re: netbsd32 emulation in driver open() or read()

2011-08-29 Thread Eduardo Horvath
On Mon, 29 Aug 2011, Manuel Bouyer wrote: So: is there a way to know if the emulation used by a userland program doing an open() is 32 or 64bit ? sys/proc.h: 1.233 ad343: /* 1.273 ad344: * These flags are kept in p_flag and are protected by p_lock. Access from 1.233

Re: what to do on memory or cache errors?

2011-08-25 Thread Eduardo Horvath
On Mon, 22 Aug 2011, Matt Thomas wrote: besides panicing, of course. This is going to involve a lot of help from UVM. It seems that uvm_fault is not the right place to handle this. Maybe we need a void uvm_page_error(paddr_t pa, int etype); where etype would indicate if this was

Re: bus_dma(9) BUS_DMA_COHERENT is a hint (or not)

2011-08-24 Thread Eduardo Horvath
On Wed, 24 Aug 2011, Frank Zerangue wrote: bus_dma(9) specifies that for bus_dmamem_map() the flag BUS_DMA_COHERENT is a hint; and that a device driver must not rely on this flag for correct operation. All calls to bus_dmamap_sync() must still be made. But for frame buffers this seems

Re: genfs_getpages vs. genfs_compat_getpages

2011-08-02 Thread Eduardo Horvath
On Tue, 2 Aug 2011, paul_kon...@dell.com wrote: Gentlepeople, Some file systems use genfs_compat_getpages while others (most of them) use genfs_getpages. I'm trying to figure out the essential differences, and why one would pick one over the other. Any pointers? genfs_vnops.c:

Re: rfc: vmem(9) API/implementation changes

2011-07-27 Thread Eduardo Horvath
On Wed, 27 Jul 2011, David Young wrote: There are a couple of changes to the API that I would like to make. First, I don't think that vmem_addr_t 0 should be reserved for error indications (0 == VMEM_ADDR_NULL), but the API should change from this: I'd recommend returning -1 on error. 0 is

Re: rfc: vmem(9) API/implementation changes

2011-07-27 Thread Eduardo Horvath
On Wed, 27 Jul 2011, David Young wrote: On Wed, Jul 27, 2011 at 04:58:23PM +, Eduardo Horvath wrote: On Wed, 27 Jul 2011, David Young wrote: There are a couple of changes to the API that I would like to make. First, I don't think that vmem_addr_t 0 should be reserved for error

Re: Multiple device attachments

2011-07-22 Thread Eduardo Horvath
approach with one parent and one or more children, at least until the config framework really has multipath support. Eduardo On Jul 22, 2011, at 12:07 PM, Eduardo Horvath wrote: On Thu, 21 Jul 2011, Frank Zerangue wrote: The examples you site seem to indicate that for example the le

Re: write alignment matters?

2011-06-27 Thread Eduardo Horvath
On Sat, 25 Jun 2011, der Mouse wrote: That what it is reasonable for a disk to do consensus *is* the interface spec I was talking about, not the de-jure non-spec of you get whatever the device (via its driver) feels like giving you. That's sort of the point. If you want what it is reasonable

Re: write alignment matters?

2011-06-21 Thread Eduardo Horvath
On Tue, 21 Jun 2011, der Mouse wrote: It does, however, appear to have something to do with the hardware (personally, I suspect the disk driver); if I try it on another 4.0.1 machine on vnd0d backed by an ordinary file, it doesn't misbehave, and if I try it on a real disk partition on that

Re: [PATCH] bufq_priocscan enhancement

2011-06-14 Thread Eduardo Horvath
On Tue, 14 Jun 2011, Marek Dopiera wrote: If we want some process aware scheduling then probably we should somehow pass the issuing process. I've always had an issue with this concept. The idea behind keeping the buffer sorted is to minimize seeks, especially the long ones that are

Re: enforcing page color matches

2011-05-25 Thread Eduardo Horvath
On Wed, 25 May 2011, Matt Thomas wrote: I'm using a MIPS 74K which needs strict page-coloring enforcement (4 colors for its Icache and 2 colors for its Dcache) so this is important to me. If this can be enforced, the code to deal with bad colors can be removed and that will greatly

Re: [patch] PCI memory i/o enables

2011-04-08 Thread Eduardo Horvath
On Fri, 8 Apr 2011, David Young wrote: Here is a patch that changes the way that the PCI subsystem and drivers use PCI_FLAGS_IO_ENABLED and PCI_FLAGS_MEM_ENABLED. I went ahead and renamed the flags in order to poison old-fashioned uses. Now they're called PCI_FLAGS_IO_OKAY and

Re: [patch] PCI memory i/o enables

2011-04-08 Thread Eduardo Horvath
On Fri, 8 Apr 2011, David Young wrote: On Fri, Apr 08, 2011 at 08:47:59PM +0200, Matthias Drochner wrote: dyo...@pobox.com said: If the flag isn't set, the driver has no business setting it. Also, if the flag isn't set, there's not much use in the driver setting the corresponding

Re: diff: add show proc command to ddb

2011-04-06 Thread Eduardo Horvath
On Wed, 6 Apr 2011, Vladimir Kirillov wrote: Hello, tech-kern@! I really wanted a show proc command to avoid looking up process information by running ps with all flags and intensive scrolling. The show proc output mostly combines the outputs of all switches in ps. Neat! Since you're

Re: covering set of PCI kernels?

2011-04-01 Thread Eduardo Horvath
don't forget SPARC.

Re: high sys time, very very slow builds on new 24-core system

2011-03-23 Thread Eduardo Horvath
On Wed, 23 Mar 2011, Thor Lancelot Simon wrote: I have a new machine with 24 2Ghz Opteron cores. It has 32GB of RAM. Building with sources on a fast SSD (preloaded into the page cache before the build using tar /dev/null) and obj, dest, and rel dirs on tmpfs, system builds are

Re: USB printing panic

2011-02-09 Thread Eduardo Horvath
On Wed, 9 Feb 2011, Bill Green wrote: I am running NetBSD 5.1 sparc64 on a Sun Ultra 5. A Samsung USB printer is connected to the system via an NEC-chipset PCI USB host. Printing via CUPS using the SPLIX drivers (http://splix.sourceforge.net/) causes a kernel panic. Printing via CUPS across

Re: FIXED: mpt Serious performance issues

2011-02-04 Thread Eduardo Horvath
On Fri, 4 Feb 2011, Thor Lancelot Simon wrote: If the firmware vendor did *not* get it wrong, then there is a separate page which holds these settings for the logical disk, and when we are operating in RAID mode we need to use that one instead of ever accessing the 16 pages for the physical

Re: Is there a way to obtain a machine's cache line size?

2011-01-20 Thread Eduardo Horvath
On Thu, 20 Jan 2011, Dennis Ferguson wrote: On 20 Jan 2011, at 11:59 , Dennis Ferguson wrote: Is there a way to obtain the correct cache line size for the machine code is running on, both in the kernel and at user level? I found it. It is coherency_unit in the kernel (it is an

Re: amr Serious performance issues

2011-01-11 Thread Eduardo Horvath
On Tue, 11 Jan 2011, Hans Rosenfeld wrote: On Tue, Jan 11, 2011 at 04:06:20PM +0100, Manuel Bouyer wrote: On Tue, Jan 11, 2011 at 03:09:03PM +0100, Hans Rosenfeld wrote: Have you used a MegaRAID recently with 5.1? I have a similar performance issue with an AMI MegaRAID SCSI 320

  1   2   >