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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20071120212651.GB11291@Krystal>
Date:	Tue, 20 Nov 2007 16:26:51 -0500
From:	Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca>
To:	Christoph Lameter <clameter@....com>
Cc:	ak@...e.de, akpm@...ux-foundation.org, travis@....com,
	linux-kernel@...r.kernel.org
Subject: Re: [rfc 19/45] cpu alloc: NFS statistics

* Christoph Lameter (clameter@....com) wrote:
> On Tue, 20 Nov 2007, Mathieu Desnoyers wrote:
> 
> > > Index: linux-2.6/fs/nfs/iostat.h
> > > ===================================================================
> > > --- linux-2.6.orig/fs/nfs/iostat.h	2007-11-15 21:17:24.391404458 -0800
> > > +++ linux-2.6/fs/nfs/iostat.h	2007-11-15 21:25:33.167654066 -0800
> > > @@ -123,7 +123,7 @@ static inline void nfs_inc_server_stats(
> > >  	int cpu;
> > >  
> > >  	cpu = get_cpu();
> > > -	iostats = per_cpu_ptr(server->io_stats, cpu);
> > > +	iostats = CPU_PTR(server->io_stats, cpu);
> > >  	iostats->events[stat] ++;
> > 
> > Is there a way to change this into a CPU_ADD ?
> 
> Yes I must have missed that.
> 
> Could be
> 
> CPU_INC(server->io_stats->events[stat]);
> 
> > 
> > >  	put_cpu_no_resched();
> > 
> > Why put_cpu_no_resched here ?
> 
> We do not want to reschedule here? We may have already disabled interrupts 
> or some such thing.

Well, if interrupts are disabled, then the preempt check will see it and
won't trigger the reschedule. On the other hand, if this code is called
when preemption is enabled, we can add important scheduler latencies by
not checking if a resched must be done at the end of this region.

So if we are so sure that interrupts are always disbled or that
preemption is already disabled when this function is called, why do we
disable preemption here at all ?

(this is not introduced by your patch, it just happens to be how the
code was before)

-- 
Mathieu Desnoyers
Computer Engineering Ph.D. Student, Ecole Polytechnique de Montreal
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F  BA06 3F25 A8FE 3BAE 9A68
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ