Re: symbol lookup in ddb - bad heuristic

2022-12-18 Thread Chuck Silvers
On Sat, Dec 10, 2022 at 01:03:06AM +0300, Valery Ushakov wrote: > db_printsym has the following heuristic: > > revision 1.68 > date: 2021-12-13 04:25:29 +0300; author: chs; state: Exp; lines: +16 -2; > commitid: MT9cIBmUIZU1AqkD; > ddb: fix function names of "noreturn" functions in

Re: ci_want_resched bits vs. MD ci_data.cpu_softints bits

2022-12-04 Thread Chuck Silvers
On Sat, Dec 03, 2022 at 03:40:13PM +0100, Martin Husemann wrote: > On Thu, Jul 07, 2022 at 09:22:42PM +0200, Martin Husemann wrote: > > I guess in older times ci->ci_want_resched was used as a boolean flag, so > > only > > 0 or !0 did matter - but nowadays it is a flag word of various bits: > >

Re: mount root hooks for non-disk-device devices

2022-08-12 Thread Chuck Silvers
On Fri, Aug 12, 2022 at 05:31:31PM +1000, Simon Burge wrote: > - A new bdev/cdev device flag D_STORAGEPOOL, which indicates that the >device can contain other storage device. I see from the diff that this is replacing the list of device type names in raidframe's rf_find_raid_components().

Re: VOP_STRATEGY for devices and pipes

2021-07-15 Thread Chuck Silvers
On Thu, Jul 15, 2021 at 02:55:10AM +, David Holland wrote: > So I think what I would like to do is, for now at least (the device > plumbing changes I posted about a couple months back would eventually > change the situation) just prohibit extended attributes on device > nodes entirely. > > (I

Re: kmem pool for half pagesize is very wasteful

2021-02-23 Thread Chuck Silvers
On Tue, Feb 23, 2021 at 06:25:50PM +1100, matthew green wrote: > hi folks. > > > while we were debugging some memory starvation issues i noticed that > the "kmem-02048" pool only has 1 item per page on a system with 4KiB > pages, same similarly "kmem-04096" on 8KiB page systems. i assume > this

Re: aiodone daemon kernel used before initialisation

2020-12-31 Thread Chuck Silvers
On Mon, Dec 28, 2020 at 05:14:52AM +0100, Pierre Pronchery wrote: > Hi tech-pkg@, > > While trying to debug an issue with my Radeon HD4870 during initialisation > (the UVD firmware does not load) I noticed an error in the kernel trap. The > important part of the backtrace

Re: panics in NetBSD/amd64 9.99.74 (Mon Oct 19)

2020-10-24 Thread Chuck Silvers
On Fri, Oct 23, 2020 at 01:40:30PM +0100, Patrick Welche wrote: > On Fri, Oct 23, 2020 at 02:15:49PM +0200, Reinoud Zandijk wrote: > > I've stumbled on some panics recently with my old memory-tight laptop i'd > > like > > to share before writing PR's about it. > ... > > -- > > > > 2nd

Re: uvm object page remove question

2020-05-16 Thread Chuck Silvers
On Wed, May 13, 2020 at 08:20:15PM +0200, Manuel Bouyer wrote: > Hello, > for Xen I need some non-standard VM operation: the tools want to map > some Xen objects for which we don't have a physical address. > The map/unmap operations are done with hypercalls which does the > page table update. In

Re: Changes to reduce pressure on uvm_pageqlock

2019-12-07 Thread Chuck Silvers
I like this new version much more than the previous version. The new diff looks incomplete though, it uses the "pdpol" field in vm_page that was new in the previous diff. It looks like there should be changes in uvm_pdaemon.c to go with the new diff too? Could you send the complete new diff again

Re: COMPAT_NETBSD32 broken on aarch64 due to UVM bug

2019-10-05 Thread Chuck Silvers
On Wed, Oct 02, 2019 at 06:07:09PM +0900, Rin Okuyama wrote: > On 2019/10/01 18:46, Jared McNeill wrote: > > On Mon, 30 Sep 2019, Rin Okuyama wrote: > > > > > http://gnats.netbsd.org/54395 > > > > > > With the patch attached in the PR, that KASSERT does no longer fire on > > > aarch64 with

reducing the use of M_NOWAIT / KM_NOSLEEP memory allocations

2019-09-25 Thread Chuck Silvers
hi folks, I'd like to convert more of the M_NOWAIT / KM_NOSLEEP memory allocations to M_WAITOK / KM_SLEEP. Use of the nowait variety should be avoided wherever possible because it causes operations to fail randomly just because the system happens to be low on memory at the time. We currently

Re: Fixing excessive shootdowns during FFS read (kern/53124) on x86 - emap, direct map

2018-05-13 Thread Chuck Silvers
On Sun, May 13, 2018 at 02:59:50PM +0200, Jaromr Dole?ek wrote: > 2018-05-12 21:24 GMT+02:00 Chuck Silvers <c...@chuq.com>: > > the problem with keeping the pages locked (ie. PG_BUSY) while accessing > > the user address space is that it can lead to deadlock if the page >

Re: Fixing excessive shootdowns during FFS read (kern/53124) on x86 - emap, direct map

2018-05-12 Thread Chuck Silvers
hi, sorry for being so late to the party on this thread, I should have replied long ago. On Fri, May 11, 2018 at 05:28:18PM +0200, Jaromr Dole?ek wrote: > I've modified the uvm_bio.c code to use direct map for amd64. Change > seems to be stable, I've also run 'build.sh tools' to test out the >

Re: rw_lock_held

2018-02-06 Thread Chuck Silvers
On Tue, Feb 06, 2018 at 07:06:33PM +0900, Ryota Ozaki wrote: > Hi, > > Is there any reason that rw_lock_held checks if it's held > by *someone*, not by curlwp? It's confusable and most (or all?) > users of the API seem to expect the latter (held by curlwp). > > Well, rwlock.9 says that rw_*_held

Re: dtrace and ZFS update

2017-12-07 Thread Chuck Silvers
before I commit it. -Chuck On Fri, Oct 13, 2017 at 09:56:01AM -0700, Chuck Silvers wrote: > hi folks, > > I've been working on updating netbsd's copy of the dtrace and zfs code to > rebase > from the existing ancient opensolaris version to a recent freebsd version. > most of t

Re: Deadlock on fragmented memory?

2017-10-19 Thread Chuck Silvers
On Thu, Oct 19, 2017 at 03:18:44PM +, Taylor R Campbell wrote: > > Date: Thu, 19 Oct 2017 14:49:24 + > > From: Taylor R Campbell > > > > Attached is a patch that attempts to restore the original behaviour of > > carving out enough KVA on boot, by

Re: dtrace and ZFS update

2017-10-14 Thread Chuck Silvers
On Sat, Oct 14, 2017 at 01:16:52AM +, m...@netbsd.org wrote: > More of my unprofessional opinion since we'll need all the help we can > get... > > +void * > +dtrace_casptr(volatile void *target, volatile void *cmp, volatile void *new) > +*/ > +EENTRY(dtrace_casptr) > +ENTRY(dtrace_cas32) >

Re: dtrace and ZFS update

2017-10-14 Thread Chuck Silvers
On Fri, Oct 13, 2017 at 08:43:35PM +, m...@netbsd.org wrote: > from before, cred seems messy lots of things about this are messy... the original solaris code already had hacks to build many files both in a kernel environment and a userland environment, and we've added a bunch of cross-OS

Re: dtrace and ZFS update

2017-10-14 Thread Chuck Silvers
On Fri, Oct 13, 2017 at 11:49:02AM -0700, bch wrote: > On 10/13/17, Chuck Silvers <c...@chuq.com> wrote: > > hi folks, > > > > I've been working on updating netbsd's copy of the dtrace and zfs code to > > rebase > > from the existing ancient opensola

dtrace and ZFS update

2017-10-13 Thread Chuck Silvers
hi folks, I've been working on updating netbsd's copy of the dtrace and zfs code to rebase from the existing ancient opensolaris version to a recent freebsd version. most of the freebsd changes are pretty close to what netbsd needs, so that seems like a more useful upstream for us. I have things

Re: vnode lifecycle change for ZFS

2017-06-16 Thread Chuck Silvers
On Wed, Jun 14, 2017 at 10:40:12PM +, David Holland wrote: > On Wed, Jun 14, 2017 at 10:25:11AM -0700, Chuck Silvers wrote: > > while working on updating ZFS to the current freebsd code I've discovered > > that the vnode lifecycle changes in the last couple of years preven

vnode lifecycle change for ZFS

2017-06-14 Thread Chuck Silvers
hi folks, while working on updating ZFS to the current freebsd code I've discovered that the vnode lifecycle changes in the last couple of years prevent ZFS from working, specifically that calling vcache_get() from within VOP_FSYNC() or VOP_PUTPAGES() while the vnode is being cleaned for reuse

Re: Introducing localcount(9)

2017-05-16 Thread Chuck Silvers
On Wed, May 17, 2017 at 07:07:18AM +0800, Paul Goyette wrote: > On Tue, 16 May 2017, Chuck Silvers wrote: > > > hi paul, > > > > is the intent that in the long term everything should be converted to use > > the new interfaces and that the non-"acquire"

Re: New diagnostic routine - mutex_ownable()

2017-05-01 Thread Chuck Silvers
On Mon, May 01, 2017 at 06:59:45PM +0800, Paul Goyette wrote: > On Mon, 1 May 2017, Paul Goyette wrote: > > > > even when using expensive checks, it's best not to make them > > > more expensive than is really necessary. > > > > I understand and agree. > > > > From my reading of sys/lockdebug.h,

Re: New diagnostic routine - mutex_ownable()

2017-04-30 Thread Chuck Silvers
On Mon, May 01, 2017 at 07:39:55AM +0800, Paul Goyette wrote: > > > As for penalty, it should be very low. The expectation is that there > > > would be no contention for the lock, so no waiting for mutex_enter() to > > > finish. Just the cost of taking and releasing the mutex. > > > > Actually,

Re: Keep local symbols of rump libraries

2017-04-11 Thread Chuck Silvers
On Mon, Apr 10, 2017 at 07:22:45PM +0900, Ryota Ozaki wrote: > Hi, > > I'm using ATF tests running rump kernels (rump_server) > for development and debugging. When a rump kernel gets > panic, it dumps a core file from which we can obtain > a backtrace by using gdb. > > Unfortunately local

Re: Add a mountlist iterator (round 2)

2017-04-05 Thread Chuck Silvers
have you considered a callback-based interface where the loop is inside the iteration API rather than in the caller? the vfs_busy/unbusy could also be hidden in the iteration API so that the callback would not need need to worry about it at all. I looked at how the iteration stuff is used in your

PCU vs. ptrace

2017-03-04 Thread Chuck Silvers
hi folks, while investigating the powerpc ieeefp.h problems that I recently fixed, I discovered that using ptrace() to access the floating-point state of a thread can hit the assertion in process_read_fpregs() about the FPU state being loaded on a different CPU. we need to change all of these

Re: kernel memory allocation failures

2016-02-15 Thread Chuck Silvers
On Fri, Dec 11, 2015 at 02:02:08PM -0500, Greg Troxel wrote: > > Chuck Silvers <c...@chuq.com> writes: > > > On Fri, Dec 11, 2015 at 09:44:07AM -0500, Greg Troxel wrote: > >> > >> Chuck Silvers <c...@chuq.com> writes: > >> > >

Re: kernel memory allocation failures

2016-02-15 Thread Chuck Silvers
On Fri, Dec 11, 2015 at 12:16:19PM -0500, Christos Zoulas wrote: > On Dec 11, 8:54am, c...@chuq.com (Chuck Silvers) wrote: > -- Subject: Re: kernel memory allocation failures > > | I haven't looked see exactly what the internal conditions are that lead to > | kmem_alloc(KM_SLEEP)

Re: Very slow transfers to/from micro SD card on a RPi B+

2016-01-19 Thread Chuck Silvers
On Tue, Jan 19, 2016 at 10:11:05AM -0800, Brian Buhrow wrote: > On Jan 19, 3:23pm, Taylor R Campbell wrote: > } Subject: Re: Very slow transfers to/from micro SD card on a RPi B+ > }Date: Tue, 19 Jan 2016 15:52:33 +0100 > }From: Stephan > } > }A way to

Re: kernel memory allocation failures

2015-12-11 Thread Chuck Silvers
On Fri, Dec 11, 2015 at 11:00:06AM -0500, Christos Zoulas wrote: > Fixing kmem_alloc() and friends not to fail under certain conditions might > be possible, but it could lead to livelock scenarios where everything is > stuck in the kernel waiting for resources to be freed. > > Perhaps we should

Re: kernel memory allocation failures

2015-12-11 Thread Chuck Silvers
On Fri, Dec 11, 2015 at 09:44:07AM -0500, Greg Troxel wrote: > > Chuck Silvers <c...@chuq.com> writes: > > > how about instead we fix the kmem_alloc() implementation to match the man > > page? > > that seems much more practical to me. adding fail

Re: kernel memory allocation failures

2015-12-10 Thread Chuck Silvers
On Thu, Dec 10, 2015 at 11:00:11PM -0500, Christos Zoulas wrote: > On Dec 11, 11:37am, k-nakah...@iij.ad.jp (Kengo NAKAHARA) wrote: > -- Subject: Re: CVS commit: src/sys/net > > | Hi, > | > | > In article <20151210081103.E0FBBFB83%cvs.NetBSD.org@localhost>, > | > Kengo NAKAHARA

Re: [PATCH] Fixing soft NFS umount -f, round 5

2015-07-12 Thread Chuck Silvers
On Fri, Jul 10, 2015 at 03:43:54AM +, Emmanuel Dreyfus wrote: On Wed, Jul 08, 2015 at 06:07:11PM +, Emmanuel Dreyfus wrote: http://ftp.espci.fr/shadow/manu/umount_f4.patch With default values, timeout = 3 and retrans = 10, we now wait for ages or the unmount to completes. In the

Re: [PATCH] Fixing soft NFS umount -f, round 3

2015-07-08 Thread Chuck Silvers
On Sun, Jul 05, 2015 at 05:19:41PM +, Emmanuel Dreyfus wrote: On Fri, Jul 03, 2015 at 09:59:40AM -0700, Chuck Silvers wrote: what's the reason for hardcoding the new timeouts to 2 seconds? there's a -t mount option to specify a timeout duration. I used the same delay as for hard mounts

Re: [PATCH] Fixing soft NFS umount -f, round 1

2015-07-03 Thread Chuck Silvers
On Wed, Jul 01, 2015 at 09:10:40PM +0200, Emmanuel Dreyfus wrote: David Holland dholland-t...@netbsd.org wrote: ...however, with a dead nfs server even sync() should time out and fail eventually. The problem is that you can ask VFS_SYNC(9) to wait or not, but there is no such option for

Re: [PATCH] Fixing soft NFS umount -f, round 1

2015-06-26 Thread Chuck Silvers
On Fri, Jun 26, 2015 at 02:58:55PM +, Emmanuel Dreyfus wrote: On Fri, Jun 26, 2015 at 07:51:27AM -0700, Chuck Silvers wrote: I'm not sure what you mean about a partial write, could you explain? This is the problem of pages not being written by the filesystem: I have not yet understood

Re: [PATCH] Fixing soft NFS umount -f, round 1

2015-06-26 Thread Chuck Silvers
On Fri, Jun 26, 2015 at 09:10:59AM +, Emmanuel Dreyfus wrote: Hi It took me some time to get it working, but here is a patch that fixes soft NFS umount -f in NetBSD-current. http://ftp.espci.fr/shadow/manu/umount_f1.patch The problem to fix is that a soft mount is supposed to be

Re: VOP_PUTPAGE ignores mount_nfs -o soft,intr

2015-06-22 Thread Chuck Silvers
On Sat, Jun 20, 2015 at 10:09:23PM +0200, Emmanuel Dreyfus wrote: Christos Zoulas chris...@astron.com wrote: Ok, what is it supposed to do? Does it fail? Give up? Get interrupted and keep looping? The process stuck in tstile waiting for vnode lock is a consequence of the initial

Re: ixg(4) mutex problem (PR#49328)

2015-02-01 Thread Chuck Silvers
On Thu, Jan 29, 2015 at 04:31:27PM +0900, Masanobu SAITOH wrote: Hi. ?Uwe Toenjes found a bug in ixg(4). See: http://mail-index.netbsd.org/current-users/2014/10/11/msg025932.html Then, PR#49328 was submitted by him. http://gnats.netbsd.org/49328 This problem is can be

Re: PR/49328 CVS commit: src/sys/dev/pci/ixgbe

2015-02-01 Thread Chuck Silvers
(moving this discussion from gnats mail to tech-kern...) On Sun, Feb 01, 2015 at 12:56:51PM -0500, Christos Zoulas wrote: On Feb 1, 9:33am, c...@chuq.com (Chuck Silvers) wrote: -- Subject: Re: PR/49328 CVS commit: src/sys/dev/pci/ixgbe | that is not legal. pmap_growkernel() is not optional

Re: Invalidate page cache

2014-12-03 Thread Chuck Silvers
On Sun, Nov 30, 2014 at 05:56:40AM +0100, Emmanuel Dreyfus wrote: Chuck Silvers c...@chuq.com wrote: you can use msync() with MS_INVALIDATE. That cannot not help with vnode cached pages, right? (matt already gave you the answer you wanted but...) yes, msync(MS_INVALIDATE) works for vnode

Re: Invalidate page cache

2014-11-29 Thread Chuck Silvers
you can use msync() with MS_INVALIDATE. -Chuck On Sat, Nov 29, 2014 at 01:06:10PM +0100, Emmanuel Dreyfus wrote: Hi Is there a way to invalidate the page cache of a given file, from userland? I understand fsync() will flush pending writes, but what about if we want to flush cached data?

Re: drivers customizing mmap(2)

2014-11-21 Thread Chuck Silvers
On Tue, Mar 05, 2013 at 12:31:37AM +, Taylor R Campbell wrote: I'd like to add a member fo_mmap to struct fileops so that cloning devices can support mmap and use other kinds of uvm objects than just uvm_deviceops and uvm_vnodeops. the first attached patch implements this, and also cleans

Re: [PATCH] PUFFS backend allocation (round 3)

2014-10-25 Thread Chuck Silvers
On Sat, Oct 25, 2014 at 09:48:49AM +0200, J. Hannken-Illjes wrote: On 25 Oct 2014, at 06:39, Emmanuel Dreyfus m...@netbsd.org wrote: Summary: when writing to a PUFFS filesystem through page cache, we do not know if backend storage is really available. If it is not, cache flush may get

Re: ubc_uiomove returns EINVAL

2014-10-24 Thread Chuck Silvers
On Fri, Oct 24, 2014 at 10:42:03PM +0700, Robert Elz wrote: Date:Fri, 24 Oct 2014 13:19:01 + From:Emmanuel Dreyfus m...@netbsd.org Message-ID: 20141024131901.gk8...@homeworld.netbsd.org | It happens in kcopy, an assembly language routine, in which I do not

Re: ubc_uiomove returns EINVAL

2014-10-24 Thread Chuck Silvers
On Sat, Oct 25, 2014 at 12:33:44AM +0700, Robert Elz wrote: Date:Fri, 24 Oct 2014 09:49:03 -0700 From:Chuck Silvers c...@chuq.com Message-ID: 20141024164903.ga29...@spathi.chuq.com | which is probably coming from | VOP_GETPAGES() of the vnode you're trying

Re: [PATCH] fallocate() for FFS

2014-09-26 Thread Chuck Silvers
On Fri, Sep 26, 2014 at 06:07:21AM +0200, Emmanuel Dreyfus wrote: Emmanuel Dreyfus m...@netbsd.org wrote: Implementing fallocate for FFS seems quite obvious. Is there anything I missed in the patch below? Is it good enough to commit? Updated version that spares some panic by properly

Re: GOP_ALLOC vs VOP_FALLOCATE

2014-09-24 Thread Chuck Silvers
On Wed, Sep 24, 2014 at 01:33:08PM +0200, Emmanuel Dreyfus wrote: Hi Is there a real difference between GOP_ALLOC and VOP_FALLOCATE? The two operation seem very similar, with just extra flag and cred args for GOP_ALLOC. VOP_* calls are part of the interface between a file system and the

Re: Vnode API change: add global vnode cache

2014-04-09 Thread Chuck Silvers
On Tue, Apr 08, 2014 at 11:23:11AM +0200, J. Hannken-Illjes wrote: On 07 Apr 2014, at 19:28, Chuck Silvers c...@chuq.com wrote: On Sun, Apr 06, 2014 at 12:14:24PM +0200, J. Hannken-Illjes wrote: Currently all file systems have to implement their own cache of vnode / fs node pairs. Most

Re: Vnode API change: add global vnode cache

2014-04-07 Thread Chuck Silvers
On Sun, Apr 06, 2014 at 12:14:24PM +0200, J. Hannken-Illjes wrote: Currently all file systems have to implement their own cache of vnode / fs node pairs. Most file systems use a copy and pasted version of ufs_ihash. So add a global vnode cache with lookup and remove: [...] hi, the

Re: pchb@acpi again

2013-05-05 Thread Chuck Silvers
On Mon, Apr 22, 2013 at 09:07:57PM +0900, KIYOHARA Takashi wrote: Hi! Chuck, From: Chuck Silvers c...@chuq.com Date: Sun, 21 Apr 2013 07:32:29 -0700 On Mon, Apr 15, 2013 at 12:26:06AM +0300, Jukka Ruohonen wrote: On Sat, Apr 13, 2013 at 06:26:19PM -0700, Chuck Silvers wrote

Re: pchb@acpi again

2013-05-05 Thread Chuck Silvers
On Mon, Apr 22, 2013 at 09:21:50PM +0900, KIYOHARA Takashi wrote: Hi! From: Chuck Silvers c...@chuq.com Date: Sun, 21 Apr 2013 08:33:24 -0700 On Mon, Apr 15, 2013 at 09:14:51PM +0900, KIYOHARA Takashi wrote: in acpi_pci.c, why do you need to skip the check for ACPI_VALID_ADR

Re: pchb@acpi again

2013-04-21 Thread Chuck Silvers
On Mon, Apr 15, 2013 at 09:14:51PM +0900, KIYOHARA Takashi wrote: in acpi_pci.c, why do you need to skip the check for ACPI_VALID_ADR? does the ACPI info on ia64 not have that flag set when it should? In my memory, YES. :- But I can't access to my ia64 now. I will try and check

Re: pchb@acpi again

2013-04-21 Thread Chuck Silvers
On Mon, Apr 15, 2013 at 09:31:37PM +0900, KIYOHARA Takashi wrote: ah, yes, removing it from that list lets it be found. and initializing the new aa_dmat and aa_dmat64 fields lets pchb_acpi attach successfully. all the PCI devices work fine, it turns out that we already have logic to

Re: 6.1_RC3 panic on shutdown: AcpiPsParseLoop ()

2013-04-06 Thread Chuck Silvers
On Fri, Apr 05, 2013 at 07:38:12PM +0200, rudolf wrote: can you boot a 6.0 kernel and see if the error messages also show up with that version? if they do then that would rule out any of my recent changes. Yes, the error messages also show up with 6.0 kernel: Today I made around 60

Re: Problems with UVM pagefaults

2013-01-09 Thread Chuck Silvers
On Tue, Jan 08, 2013 at 08:16:30PM +0100, Roger Pau Monn wrote: So far I've been able to get the ptes, pass them to Xen and stablish the mapping. Writing to that memory area from userspace seems to work fine (using pread), but the problem comes when the userspace program executes something

Re: nfsd serializing patch

2012-12-07 Thread Chuck Silvers
On Wed, Dec 05, 2012 at 05:11:37PM +0100, Manuel Bouyer wrote: On Wed, Dec 05, 2012 at 08:01:13AM -0800, Chuck Silvers wrote: this seems to be trying to work around our current limitation that all writes to a given vnode are serialized, is that right? It is partially. Another aspect

Re: 70,000 TLB shootdown IPIs per second

2012-12-06 Thread Chuck Silvers
On Wed, Dec 05, 2012 at 12:56:27PM -0500, Thor Lancelot Simon wrote: On Wed, Dec 05, 2012 at 08:29:23AM -0800, Chuck Silvers wrote: and the top few entries from that with a portion of your dd test are: ... dtrace outputs counts with the smallest numbers first, so the most interesting

Re: very bad behavior on overquota writes

2012-12-05 Thread Chuck Silvers
On Thu, Nov 22, 2012 at 12:46:54PM +0100, Manuel Bouyer wrote: On Wed, Nov 21, 2012 at 03:02:58PM +0100, Manuel Bouyer wrote: Hello, I've been looking at performance issues on our NFS server, which I tracked down to overquota writes. The problem is caused by software that do writes

Re: very bad behavior on overquota writes

2012-12-05 Thread Chuck Silvers
On Thu, Nov 22, 2012 at 06:34:55PM +0100, Manuel Bouyer wrote: On Thu, Nov 22, 2012 at 12:46:54PM +0100, Manuel Bouyer wrote: Here's another patch, after comments from chs@ in a private mail. There really are 2 parts here: - avoid unecessery list walk at truncate time. This is the change

Re: nfsd serializing patch

2012-12-05 Thread Chuck Silvers
On Thu, Nov 22, 2012 at 01:18:09PM +0100, Manuel Bouyer wrote: Hello, while working on nfs performance issues with overquota writes (which turned out to be a ffs issue), I came up with the attached patch. What this does it, for nfs over TCP, restrict a socket buffer processing to a single

Re: 70,000 TLB shootdown IPIs per second

2012-12-05 Thread Chuck Silvers
On Wed, Dec 05, 2012 at 08:48:31AM -0500, Thor Lancelot Simon wrote: I have been doing some testing on a fileserver recently donated to TNF. The system has an Areca 1280 controller (arcmsr driver) with a single RAID6 volume configured on 12 disks; 32GB of RAM; two quad-core Xeon L5420 CPUs.

Re: FFS write coalescing

2012-12-03 Thread Chuck Silvers
On Mon, Dec 03, 2012 at 06:21:30PM +0100, Edgar Fu wrote: I could find out myself by digging through the source, but probabely someone here knows the answer off his head: When FFS does write coalescing, will it try to align the resulting 64k chunk? I.e., if I have 32k blocks and I write blocks

Re: sparse dumps (was: WAPL panic)

2012-11-13 Thread Chuck Silvers
On Mon, Nov 12, 2012 at 07:46:51AM -0700, Sverre Froyen wrote: On Nov 9, 2012, at 08:01, Chuck Silvers c...@chuq.com wrote: I have tested your patches for NetBSD-current on VMware Fusion (under Mac OSX). Breaking into ddb and entering reboot 0x104 results in a good core dump. As you note

Re: call for testing: completing the device/softc split

2012-10-10 Thread Chuck Silvers
On Wed, Oct 10, 2012 at 03:57:30AM +0900, Izumi Tsutsui wrote: chs@ wrote: I put together a patch to complete the device/softc split for the remaining drivers in the tree. the patch is at: http://ftp.netbsd.org/pub/NetBSD/misc/chs/diff.devsoftc.8 +++ sys/arch/amiga/amiga/autoconf.c

Re: call for testing: completing the device/softc split

2012-10-10 Thread Chuck Silvers
On Thu, Oct 11, 2012 at 12:47:56AM +0900, Izumi Tsutsui wrote: It would be nice to split the patch into two parts, cosmetic only changes (struct device * - device_t, device_xname() macro etc) and actual split (CFATTACH_DECL - CFATTACH_DECL_NEW with softc) that could have many

assumption about a device's maxphys

2012-10-09 Thread Chuck Silvers
hi thor, your tls-maxphys branch appears to assume that a given device's maxphys is constant, but consider the case of a software device like a logical volume from LVM. one very nice feature of a volume manager that I used to work with (veritas vxvm) is that it can migrate a volume to new

Re: some ACPI fixes

2012-09-17 Thread Chuck Silvers
On Sun, Sep 16, 2012 at 07:51:12AM -0700, Chuck Silvers wrote: hi folks, attached are several patches to our ACPI code that I'd like to apply. I put some -current GENERIC kernels with these patches applied at http://ftp.netbsd.org/pub/NetBSD/misc/chs/acpi/ if people could try those

some ACPI fixes

2012-09-16 Thread Chuck Silvers
hi folks, attached are several patches to our ACPI code that I'd like to apply. I've discussed all of them with jruoho@ and a few other people but I'd like to give more people a chance to comment. diff.acpi-dis.1: this reenables calling _DIS on devices when setting up PCI link devices. this

Re: lwp resource limit

2012-06-05 Thread Chuck Silvers
On Tue, Jun 05, 2012 at 11:20:35AM +0200, Martin Husemann wrote: On Mon, Jun 04, 2012 at 11:16:45PM -0700, Matt Thomas wrote: The latter is my preference. How many processes ever have lid 1 exit early? Yes, do not count lid 1 and don't have it decrement the count on exit. some processes

Re: UVM patch for PR port-xen/45975

2012-02-20 Thread Chuck Silvers
On Sat, Feb 18, 2012 at 07:09:48PM +, Mindaugas Rasiukevicius wrote: Chuck Silvers c...@chuq.com wrote: On Sat, Feb 18, 2012 at 07:01:24PM +0100, Manuel Bouyer wrote: - the calls to pmap_update() should be moved along with the calls to pmap_kremove(). But not all

Re: UVM patch for PR port-xen/45975

2012-02-20 Thread Chuck Silvers
On Sat, Feb 18, 2012 at 10:25:08PM +0100, Manuel Bouyer wrote: On Sat, Feb 18, 2012 at 09:16:45PM +, Mindaugas Rasiukevicius wrote: Manuel Bouyer bou...@antioche.eu.org wrote: On Sat, Feb 18, 2012 at 07:49:13PM +, Mindaugas Rasiukevicius wrote: [...] I also implemented the

Re: O-A loan

2012-02-20 Thread Chuck Silvers
On Sat, Feb 18, 2012 at 08:22:35PM +, Mindaugas Rasiukevicius wrote: y...@mwd.biglobe.ne.jp (YAMAMOTO Takashi) wrote: hi, i'd like to to either fix or remove O-A page loaning. the biggest problem is the lack of users. thus no way to test. any ideas? After looking at O-A

Re: UVM patch for PR port-xen/45975

2012-02-18 Thread Chuck Silvers
On Fri, Feb 17, 2012 at 04:42:04PM +0100, Manuel Bouyer wrote: Hello, there is an issue with SMP Xen guests (see port-xen/45975), where uvm can put a page back to free list before clearing its mappings. This happens when uvm_km_pgremove_intrsafe() is used: is has to be called before

Re: UVM patch for PR port-xen/45975

2012-02-18 Thread Chuck Silvers
On Sat, Feb 18, 2012 at 07:01:24PM +0100, Manuel Bouyer wrote: - the calls to pmap_update() should be moved along with the calls to pmap_kremove(). But not all pmap_kremove() are followed by a pmap_update() in the initial code. Is it a bug ? yes. we don't currently defer TLB

Re: O_NOACCESS?

2012-02-12 Thread Chuck Silvers
On Sat, Feb 11, 2012 at 11:39:33PM +, David Holland wrote: There are, however, at least three possible things there's currently no open flags for. (1) search/lookup on a directory, as described; POSIX defines an O_SEARCH for this. (2) execute on an (executable) regular file; POSIX

Re: O-A loan

2011-12-04 Thread Chuck Silvers
On Mon, Nov 28, 2011 at 03:45:53AM +, YAMAMOTO Takashi wrote: hi, On Sun, Nov 20, 2011 at 06:52:10PM +, YAMAMOTO Takashi wrote: hi, i'd like to to either fix or remove O-A page loaning. the biggest problem is the lack of users. thus no way to test. any ideas? some

Re: O-A loan

2011-12-04 Thread Chuck Silvers
On Tue, Nov 29, 2011 at 06:38:27AM +, YAMAMOTO Takashi wrote: O-A loaned pages installed on the user address space would have a different owner than the usual map-entry.uvm_obj. although it was not a problem when you wrote this patch, at least some non-mechanical changes would be required

Re: O-A loan

2011-11-22 Thread Chuck Silvers
On Sun, Nov 20, 2011 at 06:52:10PM +, YAMAMOTO Takashi wrote: hi, i'd like to to either fix or remove O-A page loaning. the biggest problem is the lack of users. thus no way to test. any ideas? some years ago I wrote some prototype code to use the O-A loaning for read() and write().

Re: XIP

2010-10-26 Thread Chuck Silvers
On Mon, Oct 25, 2010 at 02:09:43AM +0900, Masao Uebayashi wrote: I think the uebayasi-xip branch is ready to be merged. hi, here's what I found looking at the current code in the branch: - the biggest issue I had with the version that I reviewed earlier was that it muddled the notion of a

Re: O_DIRECTORY

2010-09-21 Thread Chuck Silvers
On Mon, Sep 13, 2010 at 12:59:40PM -0400, Steven Bellovin wrote: On Sep 13, 2010, at 12:58 39PM, David Laight wrote: On Sat, Sep 11, 2010 at 02:01:43PM -0700, Chuck Silvers wrote: hi folks, the remaining missing bit that prevents acroread from working with the new linux emulation

Re: O_DIRECTORY

2010-09-21 Thread Chuck Silvers
On Sun, Sep 12, 2010 at 12:32:44AM +0200, Joerg Sonnenberger wrote: On Sat, Sep 11, 2010 at 02:01:43PM -0700, Chuck Silvers wrote: the remaining missing bit that prevents acroread from working with the new linux emulation code (PR 43695) is support for the O_DIRECTORY flag to open(). I

O_DIRECTORY

2010-09-11 Thread Chuck Silvers
hi folks, the remaining missing bit that prevents acroread from working with the new linux emulation code (PR 43695) is support for the O_DIRECTORY flag to open(). I was going to add this just in the linux emulation code but I noticed that it's actually standardized in POSIX-2008 [1], and freebsd

Re: updating COMPAT_LINUX for linux 2.6.x support (take 2)

2010-07-01 Thread Chuck Silvers
On Thu, Jul 01, 2010 at 01:32:47AM +0200, Rhialto wrote: On Wed 30 Jun 2010 at 08:57:44 -0700, Chuck Silvers wrote: - the assembler apparently now uses a different opcode for reloading %gs than it used to, so the check for this instruction in INTRFASTEXIT being the cause

Re: updating COMPAT_LINUX for linux 2.6.x support (take 2)

2010-06-30 Thread Chuck Silvers
hi again, ok, I think I'm finally done with this. changes since the previous version include: - I redid the %fs/%gs handling on amd64 so that we always keep the user values loaded (though the kernel curcpu pointer is in the GS.base MSR via swapgs), and that fixed the problem with needing

Re: updating COMPAT_LINUX for linux 2.6.x support (take 2)

2010-06-14 Thread Chuck Silvers
hi folks, ok, more progress. linux32 is working now and I fixed a few other bugs along the way. the updated diff is in ftp://ftp.netbsd.org/pub/NetBSD/misc/chs/linux/diff.linux-nptl-take2.36 this patch includes: - apply joerg's patch for amd64 TLS, reworked a bit by me to support 32-bit

Re: updating COMPAT_LINUX for linux 2.6.x support (take 2)

2010-06-13 Thread Chuck Silvers
On Mon, Jun 07, 2010 at 07:48:06AM +1000, matthew green wrote: On Sat, Jun 05, 2010 at 01:02:12PM +1000, matthew green wrote: - fix obreak() to honor RLIMIT_AS as well as RLIMIT_DATA. this will affect native processes as well as linux ones, but it seems appropriate.

Re: updating COMPAT_LINUX for linux 2.6.x support (take 2)

2010-06-06 Thread Chuck Silvers
On Sat, Jun 05, 2010 at 12:02:35AM +0100, Mindaugas Rasiukevicius wrote: Hello, Chuck Silvers c...@chuq.com wrote: I rewrote my COMPAT_LINUX changes using the 1-proc-many-LWPs model. the patch is at: ftp://ftp.netbsd.org/pub/NetBSD/misc/chs/linux/diff.linux-nptl-take2.23 I

Re: updating COMPAT_LINUX for linux 2.6.x support.

2010-06-04 Thread Chuck Silvers
On Mon, May 03, 2010 at 05:06:12AM +0100, Mindaugas Rasiukevicius wrote: Hello, Chuck Silvers c...@chuq.com wrote: hi folks, I've started looking at what it would take to update COMPAT_LINUX to allow changing the emulated linux kernel version to 2.6.x. Great! (2) what linux

Re: updating COMPAT_LINUX for linux 2.6.x support.

2010-06-04 Thread Chuck Silvers
On Mon, May 03, 2010 at 07:18:27PM +1000, matthew green wrote: (2) what linux kernel version do we want to claim to be in uname? it would be good for this to be at least as recent as the kernel matching what we choose in (1). but it would good to avoid going too

Re: updating COMPAT_LINUX for linux 2.6.x support.

2010-06-04 Thread Chuck Silvers
On Tue, May 04, 2010 at 10:54:27AM +, Andrew Doran wrote: On Sun, May 02, 2010 at 07:32:09PM -0700, Chuck Silvers wrote: I tried following the suggestion in PR 37437 (moving the ps_sigignore and ps_sigcatch fields from struct sigctx to struct sigacts, which is shared

updating COMPAT_LINUX for linux 2.6.x support.

2010-05-02 Thread Chuck Silvers
hi folks, I've started looking at what it would take to update COMPAT_LINUX to allow changing the emulated linux kernel version to 2.6.x. my goal is to allow us to upgrade pkgsrc to newer versions of the linux libraries and flash plugin that don't have all the security problems that the current

patches for PR 41813 - Real EIO being returned to userland as EFAULT

2010-03-13 Thread Chuck Silvers
hi folks, I've put a diff with fixes for this problem on all the platforms for which it exists in ftp://ftp.netbsd.org/pub/NetBSD/misc/chs/onfault/diff.onfault.*. I've tested it on these platforms: . alpha . hp300 . hppa . mips (pmax) . powerpc/ibm4xx (explora) . sh3 (hpcsh) . sparc . sparc64 .