Re: [gentoo-user] Instrumenting the GPU

2017-11-13 Thread R0b0t1
Hello,

On Mon, Nov 13, 2017 at 9:46 AM, Peter Humphrey  wrote:
> On Monday, 13 November 2017 15:12:56 GMT Daniel Frey wrote:
>> On 11/13/17 02:59, Peter Humphrey wrote:
>> > Hello list,
>> >
>> > I'm hunting a problem with cooling in this box, and I've got as far as
>> > suspecting my new AMD WX 5100 GPU.
>> >
>> > One of my BOINC projects causes the GPU temperature, as shown by
>> > gkrellm, to shoot up to 75C or more and cause intolerable system
>> > cooling noise. If I suspend that project but leave the other seven
>> > running, the temperature returns to what I hope is a normal 55C. Those
>> > seven projects are supposed to use the GPU, but I'm not sure whether
>> > they do in fact.
>> >
>> > Is there any way I can monitor what is using the GPU, to find out?
>>
>> I don't know if there's a utility for consumer level cards that can do
>> this. I do remember for Nvidia there's nvidia-smi but I don't think it
>> will list processes for desktop cards.
>
> This isn't consumer grade (look it up in your local shops ;-) ):
>
> # lspci -v -s 01:00.0
> 01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI]
> Ellesmere [Radeon Pro WX 5100] (prog-if 00 [VGA controller])
> Subsystem: Advanced Micro Devices, Inc. [AMD/ATI] Ellesmere [Radeon
> Pro WX 5100]
> Flags: bus master, fast devsel, latency 0, IRQ 34, NUMA node 0
> Memory at c000 (64-bit, prefetchable) [size=256M]
> Memory at d000 (64-bit, prefetchable) [size=2M]
> I/O ports at e000 [size=256]
> Memory at fbe0 (32-bit, non-prefetchable) [size=256K]
> Expansion ROM at 000c [disabled] [size=128K]
> Capabilities: [48] Vendor Specific Information: Len=08 
> Capabilities: [50] Power Management version 3
> Capabilities: [58] Express Legacy Endpoint, MSI 00
> Capabilities: [a0] MSI: Enable+ Count=1/1 Maskable- 64bit+
> Capabilities: [100] Vendor Specific Information: ID=0001 Rev=1
> Len=010 
> Capabilities: [150] Advanced Error Reporting
> Capabilities: [200] #15
> Capabilities: [270] #19
> Capabilities: [2b0] Address Translation Service (ATS)
> Capabilities: [2c0] Page Request Interface (PRI)
> Capabilities: [2d0] Process Address Space ID (PASID)
> Capabilities: [320] Latency Tolerance Reporting
> Capabilities: [328] Alternative Routing-ID Interpretation (ARI)
> Capabilities: [370] L1 PM Substates
> Kernel driver in use: amdgpu
>
>> The only other generic ones I can think of are cuda-z and gputop. Have
>> you tried one of those? Although I don't think it'll give you the
>> information you need either.
>
> As it's AMD, not nVidia, nvidia-smi and cuda aren't suitable. I hadn't heard
> of GPU Top - thanks. I'll have a look at it.
>
> I forgot to add that I'm using the proprietary dev-libs/amdgpu-pro-opencl
> because mesa hasn't caught up yet.
>

The level of detail you want will likely necessitate the use of a GPU
debugger. AMD provides CodeXL, located at
https://gpuopen.com/compute-product/codexl/. I suggest looking at the
profiling features.

You may want to communicate your findings to the relevant BOINC projects.

Cheers,
 R0b0t1



[gentoo-user] One package needs two other packages, which cannot be installed simultanously?

2017-11-13 Thread tuxic
Hi,

I got this:

* Error: The above package list contains packages which cannot be
 * installed at the same time on the same system.

  (net-libs/rpcsvc-proto-1.2-r1:0/0::gentoo, ebuild scheduled for merge) pulled 
in by
net-libs/rpcsvc-proto required by 
(net-analyzer/dsniff-2.4_beta1-r9:0/0::gentoo, installed)
^^^


  (net-libs/libnsl-1.1.0-r1:0/2::gentoo, ebuild scheduled for merge) pulled in 
by
net-libs/libnsl:0 required by @__auto_slot_operator_replace_installed__
net-libs/libnsl:0= required by (app-emulation/hercules-3.12:0/0::gentoo, 
installed)
net-libs/libnsl:0= required by (app-text/opensp-1.5.2-r6:0/0::gentoo, 
ebuild scheduled for merge)
net-libs/libnsl:0= required by 
(net-analyzer/dsniff-2.4_beta1-r9:0/0::gentoo, installed)
 ^^^


It looks like deoends on packages, which could not be installed at the
same time on the same system.

Or am I wrong?

Cheers
Meino




Re: [gentoo-user] Instrumenting the GPU

2017-11-13 Thread Peter Humphrey
On Monday, 13 November 2017 15:12:56 GMT Daniel Frey wrote:
> On 11/13/17 02:59, Peter Humphrey wrote:
> > Hello list,
> > 
> > I'm hunting a problem with cooling in this box, and I've got as far as
> > suspecting my new AMD WX 5100 GPU.
> > 
> > One of my BOINC projects causes the GPU temperature, as shown by
> > gkrellm, to shoot up to 75C or more and cause intolerable system
> > cooling noise. If I suspend that project but leave the other seven
> > running, the temperature returns to what I hope is a normal 55C. Those
> > seven projects are supposed to use the GPU, but I'm not sure whether
> > they do in fact.
> > 
> > Is there any way I can monitor what is using the GPU, to find out?
> 
> I don't know if there's a utility for consumer level cards that can do
> this. I do remember for Nvidia there's nvidia-smi but I don't think it
> will list processes for desktop cards.

This isn't consumer grade (look it up in your local shops ;-) ):

# lspci -v -s 01:00.0
01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] 
Ellesmere [Radeon Pro WX 5100] (prog-if 00 [VGA controller])
Subsystem: Advanced Micro Devices, Inc. [AMD/ATI] Ellesmere [Radeon 
Pro WX 5100]
Flags: bus master, fast devsel, latency 0, IRQ 34, NUMA node 0
Memory at c000 (64-bit, prefetchable) [size=256M]
Memory at d000 (64-bit, prefetchable) [size=2M]
I/O ports at e000 [size=256]
Memory at fbe0 (32-bit, non-prefetchable) [size=256K]
Expansion ROM at 000c [disabled] [size=128K]
Capabilities: [48] Vendor Specific Information: Len=08 
Capabilities: [50] Power Management version 3
Capabilities: [58] Express Legacy Endpoint, MSI 00
Capabilities: [a0] MSI: Enable+ Count=1/1 Maskable- 64bit+
Capabilities: [100] Vendor Specific Information: ID=0001 Rev=1 
Len=010 
Capabilities: [150] Advanced Error Reporting
Capabilities: [200] #15
Capabilities: [270] #19
Capabilities: [2b0] Address Translation Service (ATS)
Capabilities: [2c0] Page Request Interface (PRI)
Capabilities: [2d0] Process Address Space ID (PASID)
Capabilities: [320] Latency Tolerance Reporting
Capabilities: [328] Alternative Routing-ID Interpretation (ARI)
Capabilities: [370] L1 PM Substates
Kernel driver in use: amdgpu

> The only other generic ones I can think of are cuda-z and gputop. Have
> you tried one of those? Although I don't think it'll give you the
> information you need either.

As it's AMD, not nVidia, nvidia-smi and cuda aren't suitable. I hadn't heard 
of GPU Top - thanks. I'll have a look at it.

I forgot to add that I'm using the proprietary dev-libs/amdgpu-pro-opencl 
because mesa hasn't caught up yet.

-- 
Regards,
Peter.




Re: [gentoo-user] Instrumenting the GPU

2017-11-13 Thread Daniel Frey

On 11/13/17 07:20, J. Roeleveld wrote:


I have a Geforce GTX 950 and it does show the processes.
Surprisingly, some desktop apps (not all) are also showing, must be linked to
some library.
Also shows the GPU memory usage.

--
Joost



My card is old, that's probably why, I have a 660GTX.

Dan



Re: [gentoo-user] Instrumenting the GPU

2017-11-13 Thread J. Roeleveld
On Monday, November 13, 2017 4:12:56 PM CET Daniel Frey wrote:
> On 11/13/17 02:59, Peter Humphrey wrote:
> > Hello list,
> > 
> > I'm hunting a problem with cooling in this box, and I've got as far as
> > suspecting my new AMD WX 5100 GPU.
> > 
> > One of my BOINC projects causes the GPU temperature, as shown by gkrellm,
> > to shoot up to 75C or more and cause intolerable system cooling noise. If
> > I suspend that project but leave the other seven running, the temperature
> > returns to what I hope is a normal 55C. Those seven projects are supposed
> > to use the GPU, but I'm not sure whether they do in fact.

According to gkrellm, my GPU is at 24C. CPU is at 31C.
Will check it after running a few 3D heavy apps later tonight.

> > Is there any way I can monitor what is using the GPU, to find out?
> 
> I don't know if there's a utility for consumer level cards that can do
> this. I do remember for Nvidia there's nvidia-smi but I don't think it
> will list processes for desktop cards.

I have a Geforce GTX 950 and it does show the processes.
Surprisingly, some desktop apps (not all) are also showing, must be linked to 
some library.
Also shows the GPU memory usage.

--
Joost



Re: [gentoo-user] Instrumenting the GPU

2017-11-13 Thread Daniel Frey

On 11/13/17 02:59, Peter Humphrey wrote:

Hello list,

I'm hunting a problem with cooling in this box, and I've got as far as
suspecting my new AMD WX 5100 GPU.

One of my BOINC projects causes the GPU temperature, as shown by gkrellm, to
shoot up to 75C or more and cause intolerable system cooling noise. If I
suspend that project but leave the other seven running, the temperature
returns to what I hope is a normal 55C. Those seven projects are supposed to
use the GPU, but I'm not sure whether they do in fact.

Is there any way I can monitor what is using the GPU, to find out?



I don't know if there's a utility for consumer level cards that can do 
this. I do remember for Nvidia there's nvidia-smi but I don't think it 
will list processes for desktop cards.


The only other generic ones I can think of are cuda-z and gputop. Have 
you tried one of those? Although I don't think it'll give you the 
information you need either.


Dan



[gentoo-user] Re: memset_s

2017-11-13 Thread Nikos Chantziaras

On 13/11/17 13:38, Mart Raudsepp wrote:

On E, 2017-11-13 at 12:44 +0200, Nikos Chantziaras wrote:

explicit_bzero() is available in glibc. It's in .


Interesting. Some Xorg stuff is using libbsd explicitly, but probably
since before glibc gained this. This is new since glibc-2.25.


Oops, you're right. Didn't notice this. 2.25 is very recent. So from a 
portability point of view, it might be a good idea to stick to libbsd, 
or at least have a configure test for it.





Re: [gentoo-user] Re: memset_s

2017-11-13 Thread Mart Raudsepp
On E, 2017-11-13 at 12:44 +0200, Nikos Chantziaras wrote:
> On 13/11/17 09:17, Jorge Almeida wrote:
> > 
> > On Sun, Nov 12, 2017 at 7:03 PM, Mart Raudsepp 
> > wrote:
> > > 
> > > On L, 2017-11-11 at 00:10 +, Jorge Almeida wrote:
> > > > 
> > > > Well, most programmers probably won't care about this stuff
> > > > anyway,
> > > > and people who deal with cryptography tend to be more cautious
> > > > than
> > > > average. But I'm not really making a case for safe versions of
> > > > known
> > > > functions. After all, the usual functions do fine for most
> > > > applications. memset() would be enough to clear RAM with
> > > > sensitive
> > > > data if we had a pragma (or equivalent) to convince the
> > > > compiler to
> > > > not ignore it (I mean a pragma to invoke on a particular
> > > > function
> > > > definition when the programmer  feels that a black box
> > > > behaviour is
> > > > undesirable). Of course, solving the problem of the compiler
> > > > copying
> > > > stuff around might be harder nut to crack.
> > > Sounds like you want explicit_bzero from libbsd?
> > > 
> > According to their man page, yes. I'll have to [try to] check the
> > source. I wonder how they do it? Even the volatile modifier doesn't
> > solve the problem, according to the link in previous post.
> explicit_bzero() is available in glibc. It's in .

Interesting. Some Xorg stuff is using libbsd explicitly, but probably
since before glibc gained this. This is new since glibc-2.25.

How they do it you can find out from the source code. In libbsd case, I
saw a weak linked (do-nothing) function call after memset, so the
compiler can't know if that weakly linked function isn't getting
replaced with something that might do something with the zeroed memory,
and thus can't optimize it out. Though I looked at an older libbsd.




Re: [gentoo-user] Re: memset_s

2017-11-13 Thread Jorge Almeida
On Mon, Nov 13, 2017 at 2:44 AM, Nikos Chantziaras  wrote:

>>>
>>> Sounds like you want explicit_bzero from libbsd?
>>>
>> According to their man page, yes. I'll have to [try to] check the
>> source. I wonder how they do it? Even the volatile modifier doesn't
>> solve the problem, according to the link in previous post.
>
>
> explicit_bzero() is available in glibc. It's in .
>
>
OK, thanks. dietlibc also has it, musl doesn't.

Jorge Almeida



[gentoo-user] Instrumenting the GPU

2017-11-13 Thread Peter Humphrey
Hello list,

I'm hunting a problem with cooling in this box, and I've got as far as 
suspecting my new AMD WX 5100 GPU.

One of my BOINC projects causes the GPU temperature, as shown by gkrellm, to 
shoot up to 75C or more and cause intolerable system cooling noise. If I 
suspend that project but leave the other seven running, the temperature 
returns to what I hope is a normal 55C. Those seven projects are supposed to 
use the GPU, but I'm not sure whether they do in fact.

Is there any way I can monitor what is using the GPU, to find out?

-- 
Regards,
Peter.




[gentoo-user] Re: memset_s

2017-11-13 Thread Nikos Chantziaras

On 13/11/17 09:17, Jorge Almeida wrote:

On Sun, Nov 12, 2017 at 7:03 PM, Mart Raudsepp  wrote:

On L, 2017-11-11 at 00:10 +, Jorge Almeida wrote:

Well, most programmers probably won't care about this stuff anyway,
and people who deal with cryptography tend to be more cautious than
average. But I'm not really making a case for safe versions of known
functions. After all, the usual functions do fine for most
applications. memset() would be enough to clear RAM with sensitive
data if we had a pragma (or equivalent) to convince the compiler to
not ignore it (I mean a pragma to invoke on a particular function
definition when the programmer  feels that a black box behaviour is
undesirable). Of course, solving the problem of the compiler copying
stuff around might be harder nut to crack.


Sounds like you want explicit_bzero from libbsd?


According to their man page, yes. I'll have to [try to] check the
source. I wonder how they do it? Even the volatile modifier doesn't
solve the problem, according to the link in previous post.


explicit_bzero() is available in glibc. It's in .




Re: [gentoo-user] Re: Any reason for "Missing digest" errors at the moment

2017-11-13 Thread J. Roeleveld
On Monday, November 13, 2017 7:58:48 AM CET Nikos Chantziaras wrote:
> On 13/11/17 06:43, Andrew Lowe wrote:
> > Hi all,
> > 
> > I've just done an "eix-sync" and upon doing "emerge -NuD world", get a
> > 
> > few screen fulls of:
> > Missing digest for '/usr/portage/.
> > 
> > where the packages are mostly from kde-frameworks, -5.40.0, and a few
> > from kde-apps, -17.08.3.
> > 
> > Has anyone else seen this?
> 
> Was getting it too from time to time. I switched from rsync to git and
> it never happened again.

That's one option.
Also make sure the sync succeeded and didn't fail due to insufficient disk-
space. (The git-option requires more diskspace)

--
Joost



Re: [gentoo-user] Why do systemd scripts get installed with USE="-systemd"?

2017-11-13 Thread Alan McKinnon
On 12/11/2017 13:47, Neil Bothwick wrote:
> On Sun, 12 Nov 2017 10:55:04 +, Akater wrote:
> 
>> It looks like systemd scripts often (always?) get installed, regardless
>> of USE flag settings.
> 
> Because they are tiny so impact of them is negligible. On the other hand,
> if you don't have them and want to switch to systemd, you would end up
> having to recompile half of world just to get the service files.
>  
>> Why would they? Is this a policy?
> 
> AFAIK, yes.
> 
> If you really want to do this, you can do it with INSTALL_MASK in
> make.conf.

but you have to ask yourself, why bother even with that?

Yes, I know there are some Lennart haters around who refuse under any
circumstances to ever have anything on a computer that might in any way
be tainted by Lennart, no matter how tangentially.

But that's just daft. No-one complains about /usr/share/doc and the
large number of docs there, many of which are larger than all the
systemd unit files combined. Or what multilib setups end up doing in /lib

It makes engineering sense to install all the various init system's unit
and scripts for all packages, then the sysadmin gets to pick which one
is in use.

-- 
Alan McKinnon
alan.mckin...@gmail.com