Re: CVS commit: src/sys/uvm
y...@mwd.biglobe.ne.jp (YAMAMOTO Takashi) wrote: > > > > Here is the updated patch after your changes: > > > > http://www.netbsd.org/~rmind/uvm_anon_freelst2.diff > > > > As you noted, uvm_anfree() can temporarily release the amap lock - that > > can happen in amap_copy(). Patch closes the race by moving uvm_anfree > > () further, and changes the semantics of the function, now called > > uvm_anon_freelst(), to return with amap lock released (plus free anons > > without lock held). > > the temporary release of the amap lock is only for O->A loan > which you disabled, isn't it? Right, uvm_anon_locklaonpg() dance can happen only in O->A case. However, having uvm_anfree() able to release the lock by its interface definition is potentially defective. It is the main motivation why I want to slightly rework the code into uvm_anon_freelst() which would always drop the lock and move freeing of anons to the end point. Cleaner, less error prone. -- Mindaugas
Re: CVS commit: src/sbin/disklabel
On Tue, Jul 26, 2011 at 09:56:24AM +0200, Alan Barrett wrote: > On Mon, 25 Jul 2011, Christos Zoulas wrote: > >Modified Files: > > src/sbin/disklabel: disklabel.8 > > > >Log Message: > >mention that we don't handle more than 2TB disks/partitions. > > I think the limit's actually (2**32 - 1) sectors. With > 512-byte sectors, that's one sector less than 2TB. I've always wondered if the label could lie about the physical sector size? Making it look like you'd copied a disk image from a disk with (say) 8k sectors! But I don't think the fs support for large sectors is adequately phyical sector size agnostic. 8k sectors, 8k fragments and 64k blocks should work for FFSv1 and FFSv2. David -- David Laight: da...@l8s.co.uk
Re: CVS commit: src/sys/arch/alpha/alpha
On Wed, Jul 27, 2011 at 02:33:24AM +0900, Izumi Tsutsui wrote: > > Looking how many atoi() copies we have in tree, does it make sense to > > add the following at the end of libkern.h > > Please don't use it for #ifdef _STANDALONE ones. > libc's strtoll() is larger than dumb atoi()s. Fine. No need then, i'll only update the alpha one. -- Nicolas Joly Projects and Developments in Bioinformatics Institut Pasteur, Paris.
Re: CVS commit: src/sys/arch/alpha/alpha
On Wed, Jul 27, 2011 at 02:33:24AM +0900, Izumi Tsutsui wrote: > > Looking how many atoi() copies we have in tree, does it make sense to > > add the following at the end of libkern.h > > Please don't use it for #ifdef _STANDALONE ones. > libc's strtoll() is larger than dumb atoi()s. ...if strtoll isn't already pulled in for other reasons. Joerg
Re: CVS commit: src/sys/arch/alpha/alpha
> Looking how many atoi() copies we have in tree, does it make sense to > add the following at the end of libkern.h Please don't use it for #ifdef _STANDALONE ones. libc's strtoll() is larger than dumb atoi()s. --- Izumi Tsutsui
Re: CVS commit: src/sys/arch/alpha/alpha
On Tue, Jul 26, 2011 at 06:45:31PM +0200, Joerg Sonnenberger wrote: > On Tue, Jul 26, 2011 at 06:19:21PM +0200, Nicolas Joly wrote: > > On Tue, Jul 26, 2011 at 05:27:38PM +0200, Joerg Sonnenberger wrote: > > > On Tue, Jul 26, 2011 at 02:59:04PM +, Nicolas Joly wrote: > > > > Module Name:src > > > > Committed By: njoly > > > > Date: Tue Jul 26 14:59:03 UTC 2011 > > > > > > > > Modified Files: > > > > src/sys/arch/alpha/alpha: autoconf.c > > > > > > > > Log Message: > > > > Make atoi func static, and constify > > > > > > Shouldn't this use strtol to implement atoi? > > > > We don't have strtol for kernel use. > > Then use strtoll. We have at least some conversion code in libkern. Looking how many atoi() copies we have in tree, does it make sense to add the following at the end of libkern.h LIBKERN_INLINE int atoi(const char *) __unused; #ifdef LIBKERN_BODY LIBKERN_INLINE int atoi(const char *s) { return (int)strtoll(s, NULL, 10); } #endif and rename the conflicting ones (dm, ptyfs and procfs). njoly@lanfeust [NetBSD/src]> find sys -type f -name '*.[ch]'| xargs grep 'atoi(.*char' sys/arch/alpha/alpha/autoconf.c:static int atoi(const char *); sys/arch/alpha/alpha/autoconf.c:atoi(const char *s) sys/arch/amiga/dev/ite.c:inline static int atoi(const char *); sys/arch/amiga/dev/ite.c:atoi(const char *cp) sys/arch/atari/dev/ite.c:static inline int atoi(const char *); sys/arch/hp300/stand/common/devopen.c:atoi(char *cp) sys/arch/hp300/stand/common/samachdep.h:int atoi(char *); sys/arch/i386/stand/lib/bootmenu.c:atoi(const char *in) sys/arch/i386/stand/lib/bootmenu.h:int atoi(const char *); sys/arch/next68k/next68k/autoconf.c:static int atoi(const char *); sys/arch/next68k/next68k/autoconf.c:atoi(const char *s) sys/arch/next68k/stand/boot/devopen.c:int atoi(const char *); sys/arch/next68k/stand/boot/devopen.c:atoi(const char *cp) sys/arch/prep/stand/boot/devopen.c:int atoi(char *); sys/arch/prep/stand/boot/devopen.c:atoi(char *cp) sys/arch/rs6000/stand/boot/devopen.c:int atoi(char *); sys/arch/rs6000/stand/boot/devopen.c:atoi(char *cp) sys/arch/vax/boot/boot/devopen.c:intatoi(char *); sys/arch/x68k/dev/ite.c:inline static int atoi(const char *); sys/arch/x68k/dev/ite.c:atoi(const char *cp) sys/arch/zaurus/stand/zboot/bootmenu.c:atoi(const char *in) sys/arch/zaurus/stand/zboot/bootmenu.h:int atoi(const char *); sys/compat/ndis/subr_ntoskrnl.c:atoi(const char *str) sys/dev/dm/dm.h:uint64_t atoi(const char *); sys/dev/dm/dm_target_linear.c:atoi(const char *s) sys/dev/raidframe/rf_utils.c:rf_atoi(char *p) sys/dev/raidframe/rf_utils.h:int rf_atoi(char *p); sys/fs/ptyfs/ptyfs_vnops.c:static int atoi(const char *, size_t); sys/fs/ptyfs/ptyfs_vnops.c:atoi(const char *b, size_t len) sys/miscfs/procfs/procfs_vnops.c:static int atoi(const char *, size_t); sys/miscfs/procfs/procfs_vnops.c:atoi(const char *b, size_t len) -- Nicolas Joly Projects and Developments in Bioinformatics Institut Pasteur, Paris.
Re: CVS commit: src/sys/arch/alpha/alpha
On Tue, Jul 26, 2011 at 06:19:21PM +0200, Nicolas Joly wrote: > On Tue, Jul 26, 2011 at 05:27:38PM +0200, Joerg Sonnenberger wrote: > > On Tue, Jul 26, 2011 at 02:59:04PM +, Nicolas Joly wrote: > > > Module Name: src > > > Committed By: njoly > > > Date: Tue Jul 26 14:59:03 UTC 2011 > > > > > > Modified Files: > > > src/sys/arch/alpha/alpha: autoconf.c > > > > > > Log Message: > > > Make atoi func static, and constify > > > > Shouldn't this use strtol to implement atoi? > > We don't have strtol for kernel use. Then use strtoll. We have at least some conversion code in libkern. Joerg
Re: CVS commit: src/sys/arch/alpha/alpha
On Tue, Jul 26, 2011 at 05:27:38PM +0200, Joerg Sonnenberger wrote: > On Tue, Jul 26, 2011 at 02:59:04PM +, Nicolas Joly wrote: > > Module Name:src > > Committed By: njoly > > Date: Tue Jul 26 14:59:03 UTC 2011 > > > > Modified Files: > > src/sys/arch/alpha/alpha: autoconf.c > > > > Log Message: > > Make atoi func static, and constify > > Shouldn't this use strtol to implement atoi? We don't have strtol for kernel use. -- Nicolas Joly Projects and Developments in Bioinformatics Institut Pasteur, Paris.
Re: CVS commit: src/sys/arch/alpha/alpha
On Tue, Jul 26, 2011 at 02:59:04PM +, Nicolas Joly wrote: > Module Name: src > Committed By: njoly > Date: Tue Jul 26 14:59:03 UTC 2011 > > Modified Files: > src/sys/arch/alpha/alpha: autoconf.c > > Log Message: > Make atoi func static, and constify Shouldn't this use strtol to implement atoi? Joerg
Re: CVS commit: src/sbin/disklabel
On Mon, 25 Jul 2011, Christos Zoulas wrote: Modified Files: src/sbin/disklabel: disklabel.8 Log Message: mention that we don't handle more than 2TB disks/partitions. I think the limit's actually (2**32 - 1) sectors. With 512-byte sectors, that's one sector less than 2TB. --apb (Alan Barrett)