Re: svn commit: r209634 - head/sys/x86/isa

2010-07-02 Thread Florian Smeets
On 7/1/10 8:51 PM, Alexander Motin wrote:
> Author: mav
> Date: Thu Jul  1 18:51:18 2010
> New Revision: 209634
> URL: http://svn.freebsd.org/changeset/base/209634
> 
> Log:
>   Rework r209456:
>   Instead of using fake rid (which ISA doesn't like), delete untrusted
>   IRQ resource and let it be recreated.
> 

JFYI:

This change allows my Soekris net5501 to boot again. It was broken by
r209456, i just finished binary searching when this change flew by. :-)

Thanks,
Florian
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r228424 - in head/sys: kern sys

2012-01-23 Thread Florian Smeets
On 11.12.11 22:02, Andriy Gapon wrote:
> Author: avg
> Date: Sun Dec 11 21:02:01 2011
> New Revision: 228424
> URL: http://svn.freebsd.org/changeset/base/228424
> 
> Log:
>   panic: add a switch and infrastructure for stopping other CPUs in SMP case
>   

Hi,

Attilio asked me to verify that this commit does not introduce a
performance regression.

The box used to run these tests was a 40 Core 32GB Xeon box (HTT was
turned off, so 40 real hardware cores). As benchmark pgbench/PostgreSQL
were used, a snapshot of PostgreSQL 9.2 from 16.01.2012 was used as they
did a lot of scaling work in 9.2 which improved the numbers quite a lot
vs. 9.1. The initial benchmarks were run with a scaling factor of 100
which creates a database work set of ~1.5GB. Max throughput was achieved
at 20 Clients.

x 228423-20
+ 228424-20
+--+
|   x  +   |
|x  x   x  +*  +  +  xxx  * ++ ++ x|
| |___A__M_|   |
||___AM_|  |
+--+
N   Min   MaxMedian   AvgStddev
x  10 111073.26 115016.79 113113.49 112745.69 1169.2132
+  10 112583.56 114454.33 113668.08 113343.31 661.31761
No difference proven at 95.0% confidence

At 40 threads the results varied between 43000 - 76500 across reboots.
Attilio suspects that this can be caused by the kernel memory layout
changing under the woods creating cache effects difficult to control,
therefor the scaling factor was reduced to 10 (~150MB work set) and the
numbers got deterministic across reboot.

x 228423-40-sf10
+ 228424-40-sf10
* 228424-40-sf10-cl
+--+
|x  x  x  *** * *+  x **+  *+ * * ** + +  +|
|   |__A__||
||__MA||
||__A__M___|   |
+--+
N   Min   MaxMedian   AvgStddev
x  10 192489.43 196045.39 194138.34 194149.19 986.61561
+  10 194093.35 198864.83 196129.36 196214.69 1545.8783
Difference at 95.0% confidence
2065.5 +/- 1218.43
1.06387% +/- 0.627572%
(Student's t, pooled s = 1296.76)
*  10 194288.28 197083.85 195955.26 195733.15 1012.3529
Difference at 95.0% confidence
1583.96 +/- 939.189
0.815847% +/- 0.483746%
(Student's t, pooled s = 999.567)

The 228424-40-sf10-cl results are with a patch from Attilio [1] which he
will followup on.

If anybody wants to look at the raw numbers they are available at [2].

There are results for pbzip2 runs here [3] also, the numbers are "real"
time from /usr/bin/time.

Cheers,
Florian

[1] http://people.freebsd.org/~attilio/cachelineunshare.patch
[2] http://tb.smeets.im/~flo/stop-sched/pgsql/
[3] http://tb.smeets.im/~flo/stop-sched/pbzip2/



signature.asc
Description: OpenPGP digital signature


Re: svn commit: r228424 - in head/sys: kern sys

2012-01-25 Thread Florian Smeets
On 25.01.12 22:59, Andriy Gapon wrote:
> on 24/01/2012 00:53 Florian Smeets said the following:
>> On 11.12.11 22:02, Andriy Gapon wrote:
>>> Author: avg Date: Sun Dec 11 21:02:01 2011 New Revision: 228424 URL:
>>> http://svn.freebsd.org/changeset/base/228424
>>>
>>> Log: panic: add a switch and infrastructure for stopping other CPUs in
>>> SMP case
>>>
> 
>> Hi,
> 
>> Attilio asked me to verify that this commit does not introduce a 
>> performance regression.
> 
> First of all, thank you very much for doing this!
> 
>> The box used to run these tests was a 40 Core 32GB Xeon box (HTT was turned
>> off, so 40 real hardware cores). As benchmark pgbench/PostgreSQL were used,
>> a snapshot of PostgreSQL 9.2 from 16.01.2012 was used as they did a lot of
>> scaling work in 9.2 which improved the numbers quite a lot vs. 9.1. The
>> initial benchmarks were run with a scaling factor of 100 which creates a
>> database work set of ~1.5GB. Max throughput was achieved at 20 Clients.
> 

[mangled ministat removed]

> 
>> At 40 threads the results varied between 43000 - 76500 across reboots. 
>> Attilio suspects that this can be caused by the kernel memory layout 
>> changing under the woods creating cache effects difficult to control, 
>> therefor the scaling factor was reduced to 10 (~150MB work set) and the 
>> numbers got deterministic across reboot.
> 

[mangled ministat removed]

> 
> 
> Is it possible to see ministat's report for the difference between
> 228424-40-sf10 and 228424-40-sf10-cl datasets?
> 

Sure, here we go.

x 228424-40-sf10
+ 228424-40-sf10-cl
+--+
|x  + +  + x  ++x   + x +   +  ++  x   x  x|
||M_A_||
| |__A__M__|   |
+--+
N   Min   MaxMedian   AvgStddev
x  10 194093.35 198864.83 196129.36 196214.69 1545.8783
+  10 194288.28 197083.85 195955.26 195733.15 1012.3529
No difference proven at 95.0% confidence

>> The 228424-40-sf10-cl results are with a patch from Attilio [1] which he 
>> will followup on.
> 
> I like the patch already, regardless of how much performance difference it
> produces :-)
> 

Florian

[1] http://people.freebsd.org/~attilio/cachelineunshare.patch



signature.asc
Description: OpenPGP digital signature


svn commit: r216282 - in head: share/misc usr.bin/calendar/calendars

2010-12-07 Thread Florian Smeets
Author: flo (ports committer)
Date: Tue Dec  7 23:56:51 2010
New Revision: 216282
URL: http://svn.freebsd.org/changeset/base/216282

Log:
  Add myself to calendar.freebsd and committers-ports.dot
  
  Approved by:  fjoe (mentor)

Modified:
  head/share/misc/committers-ports.dot
  head/usr.bin/calendar/calendars/calendar.freebsd

Modified: head/share/misc/committers-ports.dot
==
--- head/share/misc/committers-ports.dotTue Dec  7 23:44:07 2010
(r216281)
+++ head/share/misc/committers-ports.dotTue Dec  7 23:56:51 2010
(r216282)
@@ -80,6 +80,7 @@ eik [label="Oliver eikemeier\n...@freebs
 erwin [label="Erwin lansing\ner...@freebsd.org\n2003/06/04"]
 farrokhi [label="Babak farrokhi\nfarro...@freebsd.org\n2006/11/07"]
 fjoe [label="Max khon\nf...@freebsd.org\n2001/08/06"]
+flo [label="Florian smeets\n...@freebsd.org\n2010/12/07"]
 fluffy [label="Dima panov\nflu...@freebsd.org\n2009/08/10"]
 flz [label="Florent thoumie\n...@freebsd.org\n2005/03/01"]
 gabor [label="Gabor kovesdan\nga...@freebsd.org\n2006/12/05"]
@@ -230,6 +231,7 @@ erwin -> lth
 erwin -> simon
 
 fjoe -> danfe
+fjoe -> flo
 fjoe -> krion
 fjoe -> osa
 
@@ -262,6 +264,7 @@ itetcu -> dryice
 itetcu -> sahil
 
 jadawin -> bapt
+jadawin -> flo
 
 joerg -> netchild
 

Modified: head/usr.bin/calendar/calendars/calendar.freebsd
==
--- head/usr.bin/calendar/calendars/calendar.freebsdTue Dec  7 23:44:07 
2010(r216281)
+++ head/usr.bin/calendar/calendars/calendar.freebsdTue Dec  7 23:56:51 
2010(r216282)
@@ -159,6 +159,7 @@
 05/25  Tom Rhodes  born in Ellwood City, Pennsylvania, 
United States, 1981
 05/25  Roman Divacky  born in Brno, Czech Republic, 1983
 05/26  Jim Pirzyk  born in Chicago, Illinois, United 
States, 1968
+05/26  Florian Smeets  born in Schwerte, 
Nordrhein-Westfalen, Germany, 1982
 05/27  Ollivier Robert  born in Paris, France, 1967
 05/29  Wilko Bulte  born in Arnhem, the Netherlands, 1965
 05/29  Seigo Tanimura  born in Kitakyushu, Fukuoka, 
Japan, 1976
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r250079 - in head: share/man/man4 sys/amd64/conf sys/conf sys/dev/ntb sys/dev/ntb/if_ntb sys/dev/ntb/ntb_hw sys/modules sys/modules/ntb sys/modules/ntb/if_ntb sys/modules/ntb/ntb_hw

2013-04-30 Thread Florian Smeets
On Mon, Apr 29, 2013 at 10:48:53PM +, Carl Delsey wrote:
> Author: carl
> Date: Mon Apr 29 22:48:53 2013
> New Revision: 250079
> URL: http://svnweb.freebsd.org/changeset/base/250079
> 
> Log:
>   Add a new driver to support the Intel Non-Transparent Bridge(NTB).
>   

Hi Carl,

This change breaks installworld.

/usr/share/man/man4/nve.4.gz -> /usr/share/man/man4/ntb_hw.4.gz
install: link /usr/share/man/man4/ntb_hw.4.gz -> /usr/share/man/man4/nve.4.gz: 
No such file or directory
*** [_maninstall] Error code 71

I think the following patch does what you intended?

Index: share/man/man4/Makefile
===
--- share/man/man4/Makefile (revision 250097)
+++ share/man/man4/Makefile (working copy)
@@ -648,7 +648,8 @@
netintro.4 networking.4
 MLINKS+=${_nfe.4} ${_if_nfe.4}
 MLINKS+=nge.4 if_nge.4
-MLINKS+=${_ntb.4} ${_if_ntb.4} ${_ntb_hw.4}
+MLINKS+=${_ntb.4} ${_if_ntb.4} \
+   ${_ntb.4} ${_ntb_hw.4}
 MLINKS+=${_nve.4} ${_if_nve.4}
 MLINKS+=${_nxge.4} ${_if_nxge.4}
 MLINKS+=patm.4 if_patm.4

With this installworld finished as expected.

Florian


pgpvPGrTMD8jY.pgp
Description: PGP signature


svn commit: r251618 - head/sbin/dmesg

2013-06-11 Thread Florian Smeets
Author: flo (ports committer)
Date: Tue Jun 11 17:46:32 2013
New Revision: 251618
URL: http://svnweb.freebsd.org/changeset/base/251618

Log:
  Move the check whether the clear flag is set. This has 2 advantages
  
  - When operating on a core file (-M) and -c is specified we don't clear
the message buffer of the running system.
  - If we don't have permission to clear the buffer print the error message
only. That's what Linux does in this case, where this feature was ported
from, and it ensures that the error message doesn't get lost in the noise.
  
  Discussed with:   antoine, cognet
  Approved by:  cognet

Modified:
  head/sbin/dmesg/dmesg.c

Modified: head/sbin/dmesg/dmesg.c
==
--- head/sbin/dmesg/dmesg.c Tue Jun 11 15:37:07 2013(r251617)
+++ head/sbin/dmesg/dmesg.c Tue Jun 11 17:46:32 2013(r251618)
@@ -120,6 +120,9 @@ main(int argc, char *argv[])
errx(1, "malloc failed");
if (sysctlbyname("kern.msgbuf", bp, &buflen, NULL, 0) == -1)
err(1, "sysctl kern.msgbuf");
+   if (clear)
+   if (sysctlbyname("kern.msgbuf_clear", NULL, NULL, 
&clear, sizeof(int)))
+   err(1, "sysctl kern.msgbuf_clear");
} else {
/* Read in kernel message buffer and do sanity checks. */
kd = kvm_open(nlistf, memf, NULL, O_RDONLY, "dmesg");
@@ -196,10 +199,6 @@ main(int argc, char *argv[])
(void)strvisx(visbp, p, nextp - p, 0);
(void)printf("%s", visbp);
}
-   if (clear)
-   if (sysctlbyname("kern.msgbuf_clear", NULL, NULL, &clear, 
sizeof(int)))
-   err(1, "sysctl kern.msgbuf_clear");
-
exit(0);
 }
 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r279588 - head/sys/netinet6

2015-03-05 Thread Florian Smeets
On 04.03.15 12:20, Andrey V. Elsukov wrote:
> Author: ae
> Date: Wed Mar  4 11:20:01 2015
> New Revision: 279588
> URL: https://svnweb.freebsd.org/changeset/base/279588
> 
> Log:
>   Fix deadlock in IPv6 PCB code.
>   

Hi,

everything I'm going to mention is running world/kernel @r279675.

I have a host running a couple of IPv6 only bhyves. It looks like I can easily 
panic them when trying to ssh into them. With my limited understanding I'd say 
the stack trace points to this commit.

All the tap interfaces used by the bhyves are connected to one bridge 
interface. Every bhyve has its own IPv6 address configured on vtnet0. The 
bridge interface on the host has an IPv6 address which is the default gateway 
in all the bhyves.

Let me know if you need anything else. It seems to be quite easy to reproduce.

Fatal trap 12: page fault while in kernel mode
cpuid = 6; apic id = 06
fault virtual address   = 0x0
fault code  = supervisor read data, page not present
instruction pointer = 0x20:0x80bda224
stack pointer   = 0x28:0xfe01efbfd330
frame pointer   = 0x28:0xfe01efbfd3d0
code segment= base 0x0, limit 0xf, type 0x1b
= DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags= interrupt enabled, resume, IOPL = 0
current process = 12 (irq265: virtio_pci0)
[ thread pid 12 tid 100036 ]
Stopped at  in6_pcbnotify+0x254:movl(%rax),%edx
db> where
Tracing pid 12 tid 100036 td 0xf800063d
in6_pcbnotify() at in6_pcbnotify+0x254/frame 0xfe01efbfd3d0
tcp6_ctlinput() at tcp6_ctlinput+0xf0/frame 0xfe01efbfd470
icmp6_input() at icmp6_input+0x18d4/frame 0xfe01efbfd660
ip6_input() at ip6_input+0x488/frame 0xfe01efbfd740
netisr_dispatch_src() at netisr_dispatch_src+0x61/frame 0xfe01efbfd7b0
ether_demux() at ether_demux+0x15d/frame 0xfe01efbfd7e0
ether_nh_input() at ether_nh_input+0x377/frame 0xfe01efbfd840
netisr_dispatch_src() at netisr_dispatch_src+0x61/frame 0xfe01efbfd8b0
ether_input() at ether_input+0x26/frame 0xfe01efbfd8d0
vtnet_rxq_eof() at vtnet_rxq_eof+0x7ab/frame 0xfe01efbfd9a0
vtnet_rx_vq_intr() at vtnet_rx_vq_intr+0x94/frame 0xfe01efbfd9e0
intr_event_execute_handlers() at intr_event_execute_handlers+0x1d8/frame 
0xfe01efbfda20
ithread_loop() at ithread_loop+0x9c/frame 0xfe01efbfda70
fork_exit() at fork_exit+0x9a/frame 0xfe01efbfdab0
fork_trampoline() at fork_trampoline+0xe/frame 0xfe01efbfdab0
--- trap 0, rip = 0, rsp = 0xfe01efbfdb70, rbp = 0 ---

(kgdb) list *0x80bda224
0x80bda224 is in in6_pcbnotify (/usr/src/sys/netinet6/in6_pcb.c:649).
644  * and the application (associated with this socket) 
wanted to
645  * know the value, notify.
646  * XXX: should we avoid to notify the value to TCP 
sockets?
647  */
648 if (cmd == PRC_MSGSIZE)
649 ip6_notify_pmtu(inp, (struct sockaddr_in6 *)dst,
650 *(u_int32_t *)cmdarg);
651
652 /*
653  * Detect if we should notify the error. If no source 
and
(kgdb) print dst
$5 = (struct sockaddr *) 0xfe01efbfd590
(kgdb) print notify
$6 = (struct inpcb *(*)(struct inpcb *,
int)) 0x80bb5220 

Florian



signature.asc
Description: OpenPGP digital signature


Re: svn commit: r304321 - in head/sys: boot/efi/boot1 boot/efi/loader boot/i386/boot2 boot/i386/gptboot boot/i386/gptzfsboot boot/i386/zfsboot boot/userboot/ficl boot/userboot/userboot boot/userboot/z

2016-08-23 Thread Florian Smeets
On 18/08/2016 02:37, Toomas Soome wrote:
> Author: tsoome
> Date: Thu Aug 18 00:37:07 2016
> New Revision: 304321
> URL: https://svnweb.freebsd.org/changeset/base/304321
> 
> Log:
>   Add SHA512, skein, large blocks support for loader zfs.
>   

Hi,

this commit seems to break booting zroot bhyve VMs. Reverting
userboot.so to 304320 on the host system makes it work again.

I start bhyve like this

/usr/share/examples/bhyve/vmrun.sh -d /dev/zvol/zroot/bhyve/poudriere -t
tap8 -c 7 -m 20G poudriere

Launching virtual machine "poudriere" ...
Consoles: userboot

FreeBSD/amd64 User boot, Revision 1.1
(r...@fry.smeets.xyz, Tue Aug 23 16:47:12 CEST 2016)
-
can't load 'kernel'

Type '?' for a list of commands, 'help' for more detailed help.
OK lsdev -v
host devices:
host0:   Host filesystem
disk devices:
disk0:   Guest drive image
  disk0p1: FreeBSD boot512KB
  disk0p2: FreeBSD swap2048MB
  disk0p3: FreeBSD ZFS 67GB
zfs devices:
OK show
LINES=24
boot_serial=1
console=userboot
currdev=disk0p3:
interpret=OK
loaddev=disk0p3:
prompt=${interpret}
smbios.bios.vendor=BHYVE
twiddle_divisor=1
OK ls
open '/' failed: no such file or directory
OK

Here the zroot setup in the VM

root@poudriere:~ # zpool get -oname,property,value all
NAME   PROPERTY   VALUE
zroot  size   67.5G
zroot  capacity   61%
zroot  altroot-
zroot  health ONLINE
zroot  guid   13278473142560840663
zroot  version-
zroot  bootfs zroot/ROOT/default
zroot  delegation on
zroot  autoreplaceoff
zroot  cachefile  -
zroot  failmode   wait
zroot  listsnapshots  off
zroot  autoexpand off
zroot  dedupditto 0
zroot  dedupratio 1.00x
zroot  free   25.9G
zroot  allocated  41.6G
zroot  readonly   off
zroot  comment-
zroot  expandsize -
zroot  freeing0
zroot  fragmentation  67%
zroot  leaked 0
zroot  feature@async_destroy  enabled
zroot  feature@empty_bpobjactive
zroot  feature@lz4_compress   active
zroot  feature@multi_vdev_crash_dump  enabled
zroot  feature@spacemap_histogram active
zroot  feature@enabled_txgactive
zroot  feature@hole_birth active
zroot  feature@extensible_dataset enabled
zroot  feature@embedded_data  active
zroot  feature@bookmarks  enabled
zroot  feature@filesystem_limits  enabled
zroot  feature@large_blocks   disabled
zroot  feature@sha512 disabled
zroot  feature@skein  disabled

root@poudriere:~ # zfs get all zroot/ROOT/default
NAMEPROPERTY  VALUE  SOURCE
zroot/ROOT/default  type  filesystem -
zroot/ROOT/default  creation  Sun Jul 27 16:32 2014  -
zroot/ROOT/default  used  7.12G  -
zroot/ROOT/default  available 23.8G  -
zroot/ROOT/default  referenced7.12G  -
zroot/ROOT/default  compressratio 2.18x  -
zroot/ROOT/default  mounted   yes-
zroot/ROOT/default  quota none   default
zroot/ROOT/default  reservation   none   default
zroot/ROOT/default  recordsize128K   default
zroot/ROOT/default  mountpoint/  local
zroot/ROOT/default  sharenfs  offdefault
zroot/ROOT/default  checksum  on default
zroot/ROOT/default  compression   lz4
inherited from zroot
zroot/ROOT/default  atime off
inherited from zroot
zroot/ROOT/default  devices   on default
zroot/ROOT/default  exec  on default
zroot/ROOT/default  setuidon default
zroot/ROOT/default  readonly  offdefault
zroot/ROOT/default  jailedoffdefault
zroot/ROOT/default  snapdir   hidden default
zroot/ROOT/default  aclmode   discarddefault
zroot/ROOT/default  aclinheritrestricted default
zroot/ROOT/default  canmount  on default
zroot/ROOT/default  xattr offtemporary
zroot/ROOT/default  copies1  default
zroot/ROOT/default  version   5  -
zroot/ROOT/

Re: svn commit: r241896 - in head: . cddl/contrib/opensolaris/lib/libzpool/common/sys share/man/man9 sys/cam/ctl sys/cddl/compat/opensolaris/kern sys/cddl/compat/opensolaris/sys sys/cddl/contrib/opens

2012-11-07 Thread Florian Smeets
On 07.11.12 08:11, Gleb Smirnoff wrote:
> On Tue, Nov 06, 2012 at 10:53:01PM +, Attilio Rao wrote:
> A> no, ports/thirdy part should be adjusted on the -CURRENT ABI.
> 
> btw, shouldn't the fusefs ports be patched, so that sysutils/fusefs-kmod
> is no longer built and installed on __FreeBSD_version >= 121 ?
> 

I have a patch [1] for that, but it touches all of the fuse ports and
bsd.port.mk, and as we are in a Feature freeze and any change that
touches bsd.port.mk needs an exp-run i chose to wait until after the 9.1
release.

Florian

[1] http://tb.smeets.im/~flo/fuse.diff



signature.asc
Description: OpenPGP digital signature


Re: svn commit: r243147 - head/usr.bin/fetch

2012-12-09 Thread Florian Smeets
On 16.11.12 13:05, Andre Oppermann wrote:
> Author: andre
> Date: Fri Nov 16 12:05:10 2012
> New Revision: 243147
> URL: http://svnweb.freebsd.org/changeset/base/243147
> 
> Log:
>   Change fetch(1) to:
>   
>   o Report the instantaneous bandwidth instead of an average since the
> beginning of the download.
>   
>   o At the finish of the download report the average bandwidth and also
> the total time it took instead of 00m00s.
>   

Andre,

it looks like this change breaks the bandwidth calculation when using -r

52% of  146 MB -25199509  Bps 03m28s

Going back to r243146 fixes it.

Florian



signature.asc
Description: OpenPGP digital signature


Re: svn commit: r243147 - head/usr.bin/fetch

2012-12-09 Thread Florian Smeets
On 09.12.12 19:27, Mateusz Guzik wrote:
> On Sun, Dec 09, 2012 at 07:06:22PM +0100, Florian Smeets wrote:
>> On 16.11.12 13:05, Andre Oppermann wrote:
>>> Author: andre
>>> Date: Fri Nov 16 12:05:10 2012
>>> New Revision: 243147
>>> URL: http://svnweb.freebsd.org/changeset/base/243147
>>>
>>> Log:
>>>   Change fetch(1) to:
>>>   
>>>   o Report the instantaneous bandwidth instead of an average since the
>>> beginning of the download.
>>>   
>>>   o At the finish of the download report the average bandwidth and also
>>> the total time it took instead of 00m00s.
>>>   
>>
>> Andre,
>>
>> it looks like this change breaks the bandwidth calculation when using -r
>>
>> 52% of  146 MB -25199509  Bps 03m28s
>>
>> Going back to r243146 fixes it.
>>
> 
> Try this:
> diff --git a/usr.bin/fetch/fetch.c b/usr.bin/fetch/fetch.c
> index 025fcdc..e723d40 100644
> --- a/usr.bin/fetch/fetch.c
> +++ b/usr.bin/fetch/fetch.c
> @@ -243,7 +243,7 @@ stat_start(struct xferstat *xs, const char *name, off_t 
> size, off_t of
> gettimeofday(&xs->start, NULL);
> xs->last.tv_sec = xs->last.tv_usec = 0;
> xs->size = size;
> -   xs->offset = offset;
> +   xs->offset = 0;
> xs->rcvd = offset;
> xs->lastrcvd = offset;
> if (v_tty && v_level > 0)
> 

That way the bandwidth calculation looks OK but now it counts the time
since starting to resume the download and not the time left :)

63% of  146 MB 7069 kBps 00m07s

Florian



signature.asc
Description: OpenPGP digital signature


Re: svn commit: r243147 - head/usr.bin/fetch

2012-12-09 Thread Florian Smeets
On 09.12.12 20:01, Mateusz Guzik wrote:
> On Sun, Dec 09, 2012 at 07:42:02PM +0100, Florian Smeets wrote:
>> On 09.12.12 19:27, Mateusz Guzik wrote:
>>> On Sun, Dec 09, 2012 at 07:06:22PM +0100, Florian Smeets wrote:
>>>> On 16.11.12 13:05, Andre Oppermann wrote:
>>>>> Author: andre
>>>>> Date: Fri Nov 16 12:05:10 2012
>>>>> New Revision: 243147
>>>>> URL: http://svnweb.freebsd.org/changeset/base/243147
>>>>>
>>>>> Log:
>>>>>   Change fetch(1) to:
>>>>>   
>>>>>   o Report the instantaneous bandwidth instead of an average since the
>>>>> beginning of the download.
>>>>>   
>>>>>   o At the finish of the download report the average bandwidth and also
>>>>> the total time it took instead of 00m00s.
>>>>>   
>>>>
>>>> Andre,
>>>>
>>>> it looks like this change breaks the bandwidth calculation when using -r
>>>>
>>>> 52% of  146 MB -25199509  Bps 03m28s
>>>>
>>>> Going back to r243146 fixes it.
>>>>
>>>
>>> Try this:
>>> diff --git a/usr.bin/fetch/fetch.c b/usr.bin/fetch/fetch.c
>>> index 025fcdc..e723d40 100644
>>> --- a/usr.bin/fetch/fetch.c
>>> +++ b/usr.bin/fetch/fetch.c
>>> @@ -243,7 +243,7 @@ stat_start(struct xferstat *xs, const char *name, off_t 
>>> size, off_t of
>>> gettimeofday(&xs->start, NULL);
>>> xs->last.tv_sec = xs->last.tv_usec = 0;
>>> xs->size = size;
>>> -   xs->offset = offset;
>>> +   xs->offset = 0;
>>> xs->rcvd = offset;
>>> xs->lastrcvd = offset;
>>> if (v_tty && v_level > 0)
>>>
>>
>> That way the bandwidth calculation looks OK but now it counts the time
>> since starting to resume the download and not the time left :)
>>
>> 63% of  146 MB 7069 kBps 00m07s
>>
> 
> Oops.. revert that and try this instead:
> diff --git a/usr.bin/fetch/fetch.c b/usr.bin/fetch/fetch.c
> index 025fcdc..d3e9b21 100644
> --- a/usr.bin/fetch/fetch.c
> +++ b/usr.bin/fetch/fetch.c
> @@ -183,7 +183,7 @@ stat_bps(struct xferstat *xs)
> if (delta == 0.0) {
> snprintf(str, sizeof str, "?? Bps");
> } else {
> -   bps = (xs->rcvd - xs->lastrcvd - xs->offset) / delta;
> +   bps = (xs->rcvd - xs->lastrcvd) / delta;
> snprintf(str, sizeof str, "%sps", stat_bytes((off_t)bps));
> }
> return (str);
> 

That looks much better.

68% of  146 MB  556 kBps 01m40s

Thanks!
Florian



signature.asc
Description: OpenPGP digital signature


Re: svn commit: r231300 - head/usr.sbin/pkg_install/create

2012-02-09 Thread Florian Smeets
On 09.02.12 21:51, Eitan Adler wrote:
> Author: eadler
> Date: Thu Feb  9 20:51:03 2012
> New Revision: 231300
> URL: http://svn.freebsd.org/changeset/base/231300
> 
> Log:
>   Permit the use of relative paths for the prefix argument.
>   Remove an unnecessary cwd from created plists when -p is specified
>   
>   PR: bin/145000
>   Submitted by:   gcooper
>   Approved by:portmgr (flo)

I guess this should read flz ;)

Florian



signature.asc
Description: OpenPGP digital signature


Re: svn commit: r233429 - in head: etc/root share/examples share/examples/csh

2012-03-24 Thread Florian Smeets

On 24.03.12 19:43, Eitan Adler wrote:

Author: eadler
Date: Sat Mar 24 18:43:18 2012
New Revision: 233429
URL: http://svn.freebsd.org/changeset/base/233429

Log:
   - Make the default values for tcsh more user friendly
   - Add an examples file with many of the not accepted suggestions from the 
discussion

   PR:  conf/160689
   Reviewed by: many
   Discussed on:current
   Approved by: cperciva



Something like this is missing:

Index: etc/mtree/BSD.usr.dist
===
--- etc/mtree/BSD.usr.dist  (revision 233429)
+++ etc/mtree/BSD.usr.dist  (working copy)
@@ -209,6 +209,8 @@
 ..
 bootforth
 ..
+csh
+..
 cvs
 contrib
 ..

otherwise the build fails

install -o root -g wheel -m 444 
/home/flo/dev/checkouts/svn-src/share/examples/csh/dot.cshrc 
//usr/share/examples/csh/dot.cshrc

install: //usr/share/examples/csh/dot.cshrc: No such file or directory

Florian
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r334474 - head/usr.bin/top

2018-06-03 Thread Florian Smeets via svn-src-head
On 01.06.18 07:51, Eitan Adler wrote:
> Author: eadler
> Date: Fri Jun  1 05:51:40 2018
> New Revision: 334474
> URL: https://svnweb.freebsd.org/changeset/base/334474
> 
> Log:
>   top(1): Display of TID when using 'H' flag
>   
>   Some users prefer seeing the TID when viewing individual threads. This
>   makes sense as the PID will be the same for multiple entries. An attempt
>   was made to include both, but there is insufficient room. As such, using
>   the TID.
>   
>   While here, rename the header variables to be more understandable.
>   
>   Discussed with: mmacy
>   Reported on:2009-10-07
> 

Hi,

I think this is a mistake. The 'H' flag should keep the PID, AFAIK you
cannot use the TID anywhere in top in contrast to the PID. I usually
start top with the 'S' and 'H' flags. Now I cannot use 'k' to kill a
process in that view, as I don't see the PID. IMHO showing TIDs should
be a separate flag, 'h' maybe, as this commit changes current/expected
behavior (POLA?).

Also, this is not documented in the man page.

Florian



signature.asc
Description: OpenPGP digital signature


Re: svn commit: r334474 - head/usr.bin/top

2018-06-04 Thread Florian Smeets via svn-src-head
On Mon, Jun 04, 2018 at 03:42:40AM -0700, Eitan Adler wrote:
> On 3 June 2018 at 22:45, Baptiste Daroussin  wrote:
> >> Hi,
> >>
> > IMHO showing TIDs should
> >> be a separate flag, 'h' maybe, as this commit changes current/expected
> >> behavior (POLA?).
> 
> Its a reasonable idea to split this out into a separate flag. I'll do that.
> 

Ok, thanks.

> >> Also, this is not documented in the man page.
> 
> It is: see the commit.
> 

Yeah, I should have been more specific, sorry. It is not documented in the 
OPTIONS
section for -H, only in the INTERACTIVE MODE section.

Florian
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r334864 - head/usr.bin/top

2018-06-08 Thread Florian Smeets via svn-src-head
On 09.06.18 04:14, Eitan Adler wrote:
> Author: eadler
> Date: Sat Jun  9 02:14:33 2018
> New Revision: 334864
> URL: https://svnweb.freebsd.org/changeset/base/334864
> 
> Log:
>   top(1): use a different command to toggle tid vs pid

Thank you.

You cannot start top with -T unless you add something like the following:

Index: top.c
===
--- top.c   (revision 334874)
+++ top.c   (working copy)
@@ -328,7 +328,7 @@
optind = 1;
}

-   while ((i = getopt(ac, av, "CSIHPabijJ:nquvzs:d:U:m:o:p:tw")) != EOF)
+   while ((i = getopt(ac, av, "CSIHPTabijJ:nquvzs:d:U:m:o:p:tw")) != EOF)
{
switch(i)
{

Another issue I just found is that if you start top with -P some columns
don't show any values:

CPU 0:  0.0% user,  0.0% nice,  0.0% system,  0.0% interrupt,  100% idle
CPU 1:  0.0% user,  0.0% nice,  0.0% system,  0.0% interrupt,  100% idle
CPU 2: % user, % nice,  1.2% system, % interrupt, 98.8% idle
CPU 3:  0.4% user, % nice,  0.4% system, % interrupt, 99.2% idle
CPU 4: % user, % nice,  0.4% system, % interrupt, 99.6% idle
CPU 5: % user, % nice,  2.4% system, % interrupt, 97.6% idle
CPU 6: % user, % nice,  0.4% system, % interrupt, 99.6% idle
CPU 7: % user, % nice,  2.4% system, % interrupt, 97.6% idle

It is correct if you start top with -TP or -HP, or if you start top -P
and then use H or T to switch back and forth. I'm not sure in which
revision this was broken, it works with r333899.

Florian



signature.asc
Description: OpenPGP digital signature


Re: svn commit: r351423 - in head: . sbin/ping6 sbin/ping6/tests

2019-11-25 Thread Florian Smeets via svn-src-head

On 26.08.19 06:28, Jan Sucan wrote:

Hello,

I can implement it. I suppose that ping6's manual page should be kept it 
this case.


I was also thinking about printing a warning for each option renamed to 
lead a willing user to use the new unified option set of ping. It could 
be either only with -v, or by default and suppressed with -q. Or should 
the option translation be completely transparent?


Is there an update on this? I found out the hard way today, as I updated 
my icinga2 host from an revision before this change to a current 
revision. In this case it's not as easy as fixing a script e.g. 
net-mgmt/monitoring-plugins check_ping command calls /sbin/ping6 with -X.


Will we get a ping6 that is fully backward compatible, or should we 
start fixing ports?


Thanks,
Florian



-Jan

On 26. 8. 2019 1:58, Alan Somers wrote:

Jan (please keep him CCed on replies) has been musing about the same
thing.  That might satisfy everyone.  Jan, would it be straightforward
to implement?
-Alan

On Sun, Aug 25, 2019 at 5:51 PM Conrad Meyer  wrote:

Hi Alan, Hiroki,

It would be pretty easy to install a `ping6` link to the `ping(8)`
binary with different option parsing (conditional on argv[0]).  That
removes most of the issues of code and space duplication, I think?
And the goal would be for the 'ping6' name to retain option
compatibility with historical ping6.

It's not an uncommon pattern; for example, 'id', 'groups', and
'whoami' are all a single binary with multiple linked names.  Another
example is Clang, which provides 'cc', 'c++', 'clang', 'clang-cpp',
'clang++' and 'cpp' links to the same inode — and those have very
different behavior depending on argv[0].

It's less work than forcing the ping6 compatibility crowd to create a
port and doesn't hurt ping(8) much, AFAICT.  Is it an acceptable
middle ground?

Best,
Conrad


___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r358153 - head/usr.sbin/services_mkdb

2020-02-22 Thread Florian Smeets via svn-src-head
On 20.02.20 04:54, Pedro F. Giffuni wrote:
> Author: pfg
> Date: Thu Feb 20 03:54:07 2020
> New Revision: 358153
> URL: https://svnweb.freebsd.org/changeset/base/358153
> 
> Log:
>   /etc/services: attempt bring the database to this century.
>   

> -smtps465/tcp#smtp protocol over TLS/SSL (was ssmtp)
> -smtps465/udp#smtp protocol over TLS/SSL (was ssmtp)

I'm not sure how removals of services have been handled in the past.
This change broke loading of my pf rule set, as I had smtps in there.
I'm not saying that this change is wrong, but I think removing entries
from services can break all kinds of stuff. Not just firewall rule sets,
also scripts and thinking more about it, it will most certainly also
break postfix as it also uses smtps as an alias for port 465 in its
master.cnf

I guess this needs to be at least mentioned in the release notes, and
maybe smtps kept as an alias, and check all the others that were removed?

Florian



signature.asc
Description: OpenPGP digital signature