lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <86453b9a-f7c3-73a5-c5a1-bfff3cb4bade@redhat.com>
Date:   Tue, 15 Jan 2019 10:52:27 -0500
From:   Waiman Long <longman@...hat.com>
To:     Thomas Gleixner <tglx@...utronix.de>
Cc:     Matthew Wilcox <willy@...radead.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Alexey Dobriyan <adobriyan@...il.com>,
        Kees Cook <keescook@...omium.org>,
        linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
        Davidlohr Bueso <dave@...olabs.net>,
        Miklos Szeredi <miklos@...redi.hu>,
        Daniel Colascione <dancol@...gle.com>,
        Dave Chinner <david@...morbit.com>,
        Randy Dunlap <rdunlap@...radead.org>
Subject: Re: [PATCH v3 4/4] /proc/stat: Call kstat_irqs_usr() only for active
 IRQs

On 01/15/2019 04:24 AM, Thomas Gleixner wrote:
> Waiman,
>
> On Mon, 14 Jan 2019, Waiman Long wrote:
>> On 01/11/2019 04:02 PM, Thomas Gleixner wrote:
>>> @@ -919,11 +920,15 @@ unsigned int kstat_irqs_cpu(unsigned int
>>>  unsigned int kstat_irqs(unsigned int irq)
>>>  {
>>>  	struct irq_desc *desc = irq_to_desc(irq);
>>> -	int cpu;
>>>  	unsigned int sum = 0;
>>> +	int cpu;
>>>  
>>>  	if (!desc || !desc->kstat_irqs)
>>>  		return 0;
>>> +	if (!irq_settings_is_per_cpu_devid(desc) &&
>>> +	    !irq_settings_is_per_cpu(desc))
>>> +	    return desc->tot_count;
>>> +
>>>  	for_each_possible_cpu(cpu)
>>>  		sum += *per_cpu_ptr(desc->kstat_irqs, cpu);
>>>  	return sum;
>>>
>>>
>> That looks good to me. Thanks for providing a more simple solution.
>>
>> BTW, if the percpu IRQ is known at allocation time, maybe we should just
>> not allocate a percpu count for the corresponding descriptor.
> Nope. You still need the per cpu accounting for /proc/interrupts ..

Yes, you are right.

Thanks,
Longman

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ