Re: Building v8 on FreeBSD with clang

2012-12-11 Thread Tom Evans
On Mon, Dec 10, 2012 at 6:30 PM, Robert Simmons rsimmo...@gmail.com wrote:
 I'm having a problem building google v8 on FreeBSD with clang.  I get
 this error:

 /usr/bin/ld: final link failed: Nonrepresentable section on output
 clang++: error: linker command failed with exit code 1 (use -v to see
 invocation)
 gmake[1]: *** [/root/v8/out/x64.release/cctest] Error 1
 gmake[1]: Leaving directory `/root/v8/out'
 gmake: *** [x64.release] Error 2

 I needed to use gmake rather than make, and I added the following to use 
 clang:
 setenv CC /usr/bin/clang
 setenv CXX /usr/bin/clang++
 setenv GYP_DEFINES clang=1

setenv LINK /usr/bin/clang++

(as grokked from the v8 ports makefile - there are also patches in
there to fix building on fbsd10 and adding pthread to the libraries to
link to, which may help you next...)

Cheers

Tom
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: Possible obscure socket leak when system under load and listener is slow to accept

2012-12-11 Thread Gleb Smirnoff
On Sun, Dec 09, 2012 at 09:57:30AM -0800, Richard Sharpe wrote:
R  lsof and sockstat can be helpful.  lsof may be able to help determine if 
R  there's a leak because it MAY will find sockets not associated with a 
R  process.
R  
R  Hope this helps.
R 
R Thanks Alfred. After following through the call graph and confirming
R (with the code) that it was correct, I am now pretty convinced that I
R was wrong in assuming that it was a socket leak.

You can always check number of socket allocations in kernel via:

  vmstat -z | grep ^socket | awk '{print $4}'

If you can't establish a scenario when the number infinitely grows,
then there is no leak.

-- 
Totus tuus, Glebius.
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: FreeBSD for serious performance?

2012-12-11 Thread Dieter BSD
Ronald writes:
 the last Alpha to be produced was shipped way back in 2004... eight years
 ago... with a top speed of 1.3 GHz I now have a cheap little media player
 thingy sitting on my desk, and _each_ of its two cores runs faster than tha\
t.
 In short, Alphas hardly constitute high-end hardware in this day and age.

 So clock rate is the only thing that matters in your world?

 Yea, pretty much.

 As regards to reliability, except for the occasional low-level quirk (which
 is usually taken care of for me by the kernel guys) I've never had a processo\
r
 fail on me.  Once, about five or six years ago I accidentally burnt up an
 Athlon XP (by not having the heatsink properly seated) but that was entirely
 my fault.

I care about data integrity, so things like ECC are on my must-have list.
I suspect that your cheap little media player thingy doesn't have ECC.
If you don't care about getting the correct answer you can have infinite
speed.

A high clock rate doesn't help when some device driver does

block_all_interrupts();
while(1)
 DELAY(MIGHT_AS_WELL_BE_FOREVER);

At least four device drivers have caused me to lose data this way.
Not what I call high performance.

 In my world, high-end means high quality. It doesn't necessarily
 mean fast, or recent.

Data integrity, and yes, reliability, that sort of thing.

Performance-wise, in most cases I don't expect to get 99.%
of the theoretical best case, I'm usually happy with 90-95%.
But without NCQ I'm only getting ~6% of what I should be getting.
Pretty pathetic for an OS that claims to be all about performance.
All the more so when the crappy OSes do support NCQ on that chip.
It's not some rare, obscure chip. Lots of boxes have it.

 I never found a way to boot from different partitions, much less
 different disks with GPT.

 Having just been recently convinced to switch over to GPT (from MBR) I do
 most sincerly hope that you are either joking or mistaken about this.

I am neither joking nor mistaken. I looked but could not find a way.
I am not claiming that a way does not exist, merely that I couldn't
find it. Perhaps there wasn't a way when I looked (it was awhile ago)
but does exist now? I have never been a fan of MBRs, they are for
pee-cees with the expected ugly kludges and limitations, real machines
don't use them. GPT isn't perfect, but it seems much nicer than MBRs.

Warren writes:
 Grub (or grub2) can do it.

Back when I was triple-booting FreeBSD, NetBSD and Linux I used
grub (rev number forgotten). It was supposed to be able to boot
BSD from a partition but I never got that to work. I had to have it
boot the MBR of a different disk which then booted BSD. I wrote
3 little shell scripts that edited grub's menu to change the default.
So I could be running FreeBSD and type boot_netbsd, and go have lunch
while it rebooted. Other than not booting BSD from a partition it
wasn't that bad for something that smells of penguin.

 If you're booting multiple versions of FreeBSD, see gpart(8)
 for some partition attributes that may help.

You mean the bootme bootonce stuff? That looks promising, assuming
I can manage to decode the man page, and figure out what it actually
does. Mostly multiple versions of FreeBSD. (for example 7.0 had a couple
of bugs preventing it from booting, so having 6 still available was
essential.) I no long need Linux (YEA!!!), and after a certain fubar
incident have declared a Linux Free Zone. It would be nice if I could
also boot Net/Open/Dragonfly. I don't see a way to boot multiple disks,
but GPT allows enough partitions that I probably won't care.

Not sure if the bootme bootonce stuff wasn't there yet when I looked,
or if I just missed it. Thanks for the pointer.

 Or even consider ZFS boot environments.

I plan to stick with FFS w/softdeps.
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org

Re: FreeBSD for serious performance?

2012-12-11 Thread Adrian Chadd
 I'm not seeing:

* any references to driver code that exhibits that very broken behaviour;
* any patches from you to implement NCQ on your nforce chipset;
* any offer of incentive to any developer to add that support.

Now, (1) is definitely worrying but as you've not provided any actual
information, the level of helpfulness of this comment is 0.
(2) and (3) would go a long way to making FreeBSD better.

FreeBSD is only as much as the community of contributors and
developers have the time and energy to make it be. If you want FreeBSD
to be different/better/something, you have to step up.



Adrian


On 11 December 2012 12:43, Dieter BSD dieter...@engineer.com wrote:
Ronald writes:
 the last Alpha to be produced was shipped way back in 2004... eight years
 ago... with a top speed of 1.3 GHz I now have a cheap little media player
 thingy sitting on my desk, and _each_ of its two cores runs faster than 
 tha\
 t.
 In short, Alphas hardly constitute high-end hardware in this day and age.

 So clock rate is the only thing that matters in your world?

 Yea, pretty much.

 As regards to reliability, except for the occasional low-level quirk (which
 is usually taken care of for me by the kernel guys) I've never had a 
 processo\
 r
 fail on me.  Once, about five or six years ago I accidentally burnt up an
 Athlon XP (by not having the heatsink properly seated) but that was entirely
 my fault.

 I care about data integrity, so things like ECC are on my must-have list.
 I suspect that your cheap little media player thingy doesn't have ECC.
 If you don't care about getting the correct answer you can have infinite
 speed.

 A high clock rate doesn't help when some device driver does

 block_all_interrupts();
 while(1)
  DELAY(MIGHT_AS_WELL_BE_FOREVER);

 At least four device drivers have caused me to lose data this way.
 Not what I call high performance.

 In my world, high-end means high quality. It doesn't necessarily
 mean fast, or recent.

 Data integrity, and yes, reliability, that sort of thing.

 Performance-wise, in most cases I don't expect to get 99.%
 of the theoretical best case, I'm usually happy with 90-95%.
 But without NCQ I'm only getting ~6% of what I should be getting.
 Pretty pathetic for an OS that claims to be all about performance.
 All the more so when the crappy OSes do support NCQ on that chip.
 It's not some rare, obscure chip. Lots of boxes have it.

 I never found a way to boot from different partitions, much less
 different disks with GPT.

 Having just been recently convinced to switch over to GPT (from MBR) I do
 most sincerly hope that you are either joking or mistaken about this.

 I am neither joking nor mistaken. I looked but could not find a way.
 I am not claiming that a way does not exist, merely that I couldn't
 find it. Perhaps there wasn't a way when I looked (it was awhile ago)
 but does exist now? I have never been a fan of MBRs, they are for
 pee-cees with the expected ugly kludges and limitations, real machines
 don't use them. GPT isn't perfect, but it seems much nicer than MBRs.

 Warren writes:
 Grub (or grub2) can do it.

 Back when I was triple-booting FreeBSD, NetBSD and Linux I used
 grub (rev number forgotten). It was supposed to be able to boot
 BSD from a partition but I never got that to work. I had to have it
 boot the MBR of a different disk which then booted BSD. I wrote
 3 little shell scripts that edited grub's menu to change the default.
 So I could be running FreeBSD and type boot_netbsd, and go have lunch
 while it rebooted. Other than not booting BSD from a partition it
 wasn't that bad for something that smells of penguin.

 If you're booting multiple versions of FreeBSD, see gpart(8)
 for some partition attributes that may help.

 You mean the bootme bootonce stuff? That looks promising, assuming
 I can manage to decode the man page, and figure out what it actually
 does. Mostly multiple versions of FreeBSD. (for example 7.0 had a couple
 of bugs preventing it from booting, so having 6 still available was
 essential.) I no long need Linux (YEA!!!), and after a certain fubar
 incident have declared a Linux Free Zone. It would be nice if I could
 also boot Net/Open/Dragonfly. I don't see a way to boot multiple disks,
 but GPT allows enough partitions that I probably won't care.

 Not sure if the bootme bootonce stuff wasn't there yet when I looked,
 or if I just missed it. Thanks for the pointer.

 Or even consider ZFS boot environments.

 I plan to stick with FFS w/softdeps.
 ___
 freebsd-hackers@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
 To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: FreeBSD for serious performance?

2012-12-11 Thread Peter Jeremy
On 2012-Dec-11 15:43:21 -0500, Dieter BSD dieter...@engineer.com wrote:
I care about data integrity, so things like ECC are on my must-have list.

Well, that's supported by all server CPUs (AMD Opteron, Intel Itanium,
Intel Xeon, Oracle/Sun SPARC) and some desktop CPUs (most AMD x86 chips).

A high clock rate doesn't help when some device driver does

block_all_interrupts();
while(1)
 DELAY(MIGHT_AS_WELL_BE_FOREVER);

At least four device drivers have caused me to lose data this way.

Which device drivers?  We can't fix problems we don't know about.

Data integrity, and yes, reliability, that sort of thing.

Virtually everything except some embedded and consumer-grade x86
systems manage that.

But without NCQ I'm only getting ~6% of what I should be getting.

So, in one sentence you state that ECC is a must have and then you
complain that that FreeBSD doesn't support NCQ on an old, low-end
(consumer-grade) chipset that doesn't support ECC.

It's not some rare, obscure chip. Lots of boxes have it.

None that support ECC, so you wouldn't be interested in any of them.

 I never found a way to boot from different partitions, much less
 different disks with GPT.

Yes, this is a limitation of FreeBSD's GPT loader.  So far, no-one has
written the code to support multiple boot partitions or disks.  Note
that most BIOS's allow you to select the boot disk - which is a
workaround.

-- 
Peter Jeremy


pgpgEyjjmIWvx.pgp
Description: PGP signature


why is kern.maxproc not read/write?

2012-12-11 Thread Alfred Perlstein

Eitan was asking me to update the FAQ section 5.7:


*5.7.* Why do I get the error kernel: proc: table is full?

That error is no longer relevant, but I also seemed to find out 
something else interesting..


Been grepping through the code, and it seems like the only side-effect 
of maxproc changing would be overcrowding the hash table tidhashtbl and 
pidhashtbl.


I can't see anything that's statically allocated any longer.

The only bad thing is that the procs seem to be taken from a 
UMA_ZONE_NOFREE zone, so if the user makes an insanely high value, it 
could be end of days.


Even the MD code seems to use it to size the number of pv entries.

I'm wondering if making this a runtime tunable that has a SYSCTL_PROC 
attached that doesn't allow it to go below some PROC_MIN would be OK.


Am I missing something?

As far as Eitan's question about the FAQ section, the new message 
printed is:

maxproc limit exceeded by uid %i, please see tuning(7) and login.conf(5)

The faq is wrong, and tells the user to change sysctl.conf, where it 
should say to update loader.conf.


-Alfred
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org