Daniel Walker | 1 Jan 2010 02:20

[PATCH] pm_qos: Add QoS param, minimum system bus frequency

From: Praveen Chidambaram <pchidamb <at> quicinc.com>

In some systems, the system bus speed can be varied, usually
based on the current CPU frequency.  However, various device
drivers and/or applications may need a faster system bus for I/O
even though the CPU itself may be idle.

Signed-off-by: Praveen Chidambaram <pchidamb <at> quicinc.com>
Signed-off-by: David Brown <davidb <at> quicinc.com>
Signed-off-by: Daniel Walker <dwalker <at> codeaurora.org>
---
 include/linux/pm_qos_params.h |    3 ++-
 kernel/pm_qos_params.c        |   32 +++++++++++++++++++++++++-------
 2 files changed, 27 insertions(+), 8 deletions(-)

diff --git a/include/linux/pm_qos_params.h b/include/linux/pm_qos_params.h
index d74f75e..091c13c 100644
--- a/include/linux/pm_qos_params.h
+++ b/include/linux/pm_qos_params.h
 <at>  <at>  -10,8 +10,9  <at>  <at> 
 #define PM_QOS_CPU_DMA_LATENCY 1
 #define PM_QOS_NETWORK_LATENCY 2
 #define PM_QOS_NETWORK_THROUGHPUT 3
+#define PM_QOS_SYSTEM_BUS_FREQ 4

-#define PM_QOS_NUM_CLASSES 4
+#define PM_QOS_NUM_CLASSES 5
 #define PM_QOS_DEFAULT_VALUE -1

 int pm_qos_add_requirement(int qos, char *name, s32 value);
(Continue reading)

Daniel Walker | 1 Jan 2010 02:22

Re: [PATCH] pm_qos: Add QoS param, minimum system bus frequency

Just adding the signed off by's to the CC line.

On Thu, 2009-12-31 at 17:20 -0800, Daniel Walker wrote:
> From: Praveen Chidambaram <pchidamb <at> quicinc.com>
> 
> In some systems, the system bus speed can be varied, usually
> based on the current CPU frequency.  However, various device
> drivers and/or applications may need a faster system bus for I/O
> even though the CPU itself may be idle.
> 
> Signed-off-by: Praveen Chidambaram <pchidamb <at> quicinc.com>
> Signed-off-by: David Brown <davidb <at> quicinc.com>
> Signed-off-by: Daniel Walker <dwalker <at> codeaurora.org>
> ---
>  include/linux/pm_qos_params.h |    3 ++-
>  kernel/pm_qos_params.c        |   32 +++++++++++++++++++++++++-------
>  2 files changed, 27 insertions(+), 8 deletions(-)
> 
> diff --git a/include/linux/pm_qos_params.h b/include/linux/pm_qos_params.h
> index d74f75e..091c13c 100644
> --- a/include/linux/pm_qos_params.h
> +++ b/include/linux/pm_qos_params.h
>  <at>  <at>  -10,8 +10,9  <at>  <at> 
>  #define PM_QOS_CPU_DMA_LATENCY 1
>  #define PM_QOS_NETWORK_LATENCY 2
>  #define PM_QOS_NETWORK_THROUGHPUT 3
> +#define PM_QOS_SYSTEM_BUS_FREQ 4
>  
> -#define PM_QOS_NUM_CLASSES 4
> +#define PM_QOS_NUM_CLASSES 5
(Continue reading)

Américo Wang | 1 Jan 2010 04:08
Picon

Re: regression: crash from 'ls /sys/modules/wl1251_spi/notes'

On Wed, Dec 30, 2009 at 11:49 PM, James Bottomley
<James.Bottomley <at> hansenpartnership.com> wrote:
> On Wed, 2009-12-30 at 13:41 +0200, Kalle Valo wrote:
>> Hello,
>>
>> I noticed weird crashes related to wl1251_spi notes sysfs directory
>> with current wireless-testing (2.6.33-rc2 plus some wireless patches).
>> The simplest way to reproduce the problem is to do this on a nokia n900
>> (arm/omap 3430):
>>
>> # ls /sys/module/wl1251_spi/notes/
>> [ 4776.503234] Unable to handle kernel NULL pointer dereference at
>> virtual address 00000000
>> [ 4776.511596] pgd = cce88000
>> [ 4776.514343] [00000000] *pgd=8f04a031, *pte=00000000, *ppte=00000000
>> [ 4776.520812] Internal error: Oops: 17 [#1]
>> [ 4776.524871] last sysfs file: /sys/class/net/wlan0/flags
>> [ 4776.530151] Modules linked in: wl1251_spi wl1251 mac80211 cfg80211
>> [ 4776.536468] CPU: 0    Not tainted  (2.6.33-rc2-wl-47091-g981eb84
>> #12)
>> [ 4776.542999] PC is at strlen+0xc/0x20
>> [ 4776.546630] LR is at sysfs_readdir+0x15c/0x1e0
>> [ 4776.551116] pc : [<c01476ac>]    lr : [<c00f5e6c>]    psr: a0000013
>> [ 4776.551147] sp : cce87f28  ip : 22222222  fp : be99961c
>> [ 4776.562744] r10: cce87f80  r9 : 00000000  r8 : 00000000
>> [ 4776.568023] r7 : c00b9540  r6 : cce87f80  r5 : ccec4458  r4 :
>> ce808980
>> [ 4776.574615] r3 : 00000000  r2 : 00000002  r1 : 22222222  r0 :
>> 00000000
>> [ 4776.581207] Flags: NzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM
(Continue reading)

Nitin Gupta | 1 Jan 2010 06:08
Favicon

[PATCH 2/2 repost] [mmotm v2] Add notifiers for various swap events

(reposting with detailed description, no code changes)

ramzswap driver creates RAM backed block devices which are
used as swap disks. Pages swapped to these disks are compressed
and stored in memory itself. However, when a swap page becomes
stale i.e. it is no longer referenced by any process (say, when
owning process exits), the driver does not get any notification
about this. So, it has to keep such pages in memory until kernel
swaps to the same swap slot again thereby overwriting previous
(stale) page.

Often, a large number of such stale pages accumulate which defeats
the whole purpose of in-memory compressed swapping and it begins
to have a negative impact on system performance.

To overcome this problem, we now register a notification for the
event when a swap slot is no longer used. The registered callback
immediately frees corresponding memory, eliminating any stale data
in (compressed) memory.

v2: add calls to unregister all notifiers during module unload.

Signed-off-by: Nitin Gupta <ngupta <at> vflare.org>
---
 drivers/staging/ramzswap/ramzswap_drv.c   |   73 +++++++++++++++++++++++++++++
 drivers/staging/ramzswap/ramzswap_drv.h   |    1 +
 drivers/staging/ramzswap/ramzswap_ioctl.h |    1 +
 3 files changed, 75 insertions(+), 0 deletions(-)

diff --git a/drivers/staging/ramzswap/ramzswap_drv.c b/drivers/staging/ramzswap/ramzswap_drv.c
(Continue reading)

Eric Miao | 1 Jan 2010 08:44
Picon
Gravatar

Re: driver core: make platform_device_id table const

Forget to make linux-kernel CC'ed.

On Fri, Jan 1, 2010 at 3:43 PM, Eric Miao <eric.y.miao <at> gmail.com> wrote:
> The platform ID table is normally const, force that by adding the attribute.
>
>    Signed-off-by: Eric Miao <eric.y.miao <at> gmail.com>
>
> diff --git a/include/linux/platform_device.h b/include/linux/platform_device.h
> index 71ff887..f5c1e7b 100644
> --- a/include/linux/platform_device.h
> +++ b/include/linux/platform_device.h
>  <at>  <at>  -21,7 +21,7  <at>  <at>  struct platform_device {
>        u32             num_resources;
>        struct resource * resource;
>
> -       struct platform_device_id       *id_entry;
> +       const struct platform_device_id *id_entry;
>
>        /* arch specific additions */
>        struct pdev_archdata    archdata;
>
Ingo Molnar | 1 Jan 2010 10:27
Picon
Picon
Favicon

Re: [PATCH 1/3] x86: record relocation offset


* Arnaldo Carvalho de Melo <acme <at> infradead.org> wrote:

> Em Thu, Dec 31, 2009 at 11:00:00AM +0800, Xiao Guangrong escreveu:
> > Arnaldo Carvalho de Melo wrote:
> 
> > > Conclusion: at 'perf record' time store the address of a well know
> > > symbol (_text) into the perf.data header. Later, at perf report time, if
> > > using a vmlinux file, calculate the relocation by subtracting the same
> > > well known symbol from the one stored in the header.
> 
> > > So no need for ioctl or boot stuff.
> 
> > I'm little confused, how to get the load symbol address?
> > It's not a good way, if you get it from '/proc/kallsyms', we can't assume kernel
> > has this file.
> 
> Well, then its just a matter of exposing _text as 
> /sys/kernel/sections/.text, as we already have for modules:
> 
> [acme <at> ana linux-2.6-tip]$ cat /sys/module/ipv6/sections/.text 
> 0xfa0c2000
> 
> Which matches
> 
> nf_conntrack_ipv6 17548 2 - Live 0xfa147000
> ipv6 239420 32 ip6t_REJECT,nf_conntrack_ipv6, Live 0xfa0c2000
> [acme <at> ana linux-2.6-tip]$

Yeah, that's a good idea and pretty complementary to the existing scheme for 
(Continue reading)

Zhang, Yanmin | 1 Jan 2010 11:12
Picon

Re: fio mmap randread 64k more than 40% regression with 2.6.33-rc1

On Thu, 2009-12-31 at 11:34 +0100, Corrado Zoccolo wrote:
> Hi Yanmin,
> On Thu, Dec 31, 2009 at 10:16 AM, Zhang, Yanmin
> <yanmin_zhang <at> linux.intel.com> wrote:
> > Comparing with kernel 2.6.32, fio mmap randread 64k has more than 40% regression with
> > 2.6.33-rc1.
> 
Thanks for your timely reply. Some comments inlined below.

> Can you compare the performance also with 2.6.31?
We did. We run Linux kernel Performance Tracking project and run many benchmarks when a RC kernel
is released.

The result of 2.6.31 is quite similar to the one of 2.6.32. But the one of 2.6.30 is about
8% better than the one of 2.6.31.

> I think I understand what causes your problem.
> 2.6.32, with default settings, handled even random readers as
> sequential ones to provide fairness. This has benefits on single disks
> and JBODs, but causes harm on raids.
I didn't test RAID as that machine with hardware RAID HBA is crashed now. But if we turn on
hardware RAID in HBA, mostly we use noop io scheduler.

> For 2.6.33, we changed the way in which this is handled, restoring the
> enable_idle = 0 for seeky queues as it was in 2.6.31:
>  <at>  <at>  -2218,13 +2352,10  <at>  <at>  cfq_update_idle_window(struct cfq_data *cfqd,
> struct cfq_queue *cfqq,
>        enable_idle = old_idle = cfq_cfqq_idle_window(cfqq);
> 
>        if (!atomic_read(&cic->ioc->nr_tasks) || !cfqd->cfq_slice_idle ||
(Continue reading)

Eric W. Biederman | 1 Jan 2010 12:41
Favicon

Re: RFC: disablenetwork facility. (v4)

daw <at> cs.berkeley.edu (David Wagner) writes:

> Eric W. Biederman wrote:
>>The problem with the disable_network semantics you want
>>is that they allow you to perform a denial of service attack
>>on privileged users.  An unprivileged DOS attack is unsuitable
>>for a general purpose feature in a general purpose kernel.
>
> I'm not persuaded yet.

I won't try hard to persuade you if you drop me off the cc list.

> When you talk about DOS, let's be a bit more precise.  disablenetwork
> gives a way to deny setuid programs access to the network.  It's not a
> general-purpose DOS; it's denying access to the network only.  And the
> network is fundamentally unreliable.  No security-critical mechanism
> should be relying upon the availability of the network.

The audit daemon should not rely on netlink?

> So while I certainly can't rule out the possibility that disablenetwork
> might introduce minor issues, I think there are fundamental reasons to
> be skeptical that disablenetwork will introduce serious new security
> problems.

For me the case is simple.  I have seen several plausible sounding
scenarios that get most of the way there.  I know I am stupid when
it comes to security and that people exploiting problems are going
to be looking harder than I will.  Therefore I think there is
a reasonable chance this will introduce a security hole for someone.
(Continue reading)

Maciej Rutecki | 1 Jan 2010 14:40
Picon

Re: 2.6.33-rc1 - Weird hard hangs when rendering 'some' web-sites in Firefox

2009/12/21 David <david <at> unsolicited.net>:
> I'm still not sure whether what I'm seeing here is latent hardware
> problems, but, as a heads up :-
>
>    2.6.32, 2.6.32.2 (and previous kernels) - All OK
>    2.6.33-rc1 - Machine seems fine, until :-
>
> I browse to particular sites (one of which is an internet banking site,
> so no heavy flash etc.). My machine will (completely and repeatably)
> hang solid. Nothing showing with netconsole, sshd dead, sysrq dead ...
> reset button time.
>
> .config, bootup dmesg, and lspci -vvv attached for interest (userspace
> is Ubuntu 9.10).
>
> May have time to bisect, but not 'till the holidays.
>
> Cheers
> David
>
>

I can confirm this. Probably it's related only to wireless
connections, wired seems be OK. My device is:
08:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG
[Golan] Network Connection (rev 02)

Regards
--

-- 
Maciej Rutecki
(Continue reading)

Krzysztof Halasa | 1 Jan 2010 14:38
Picon

Re: [gentoo-user] RAM installed vs reported

Thanasis <thanasis <at> asyr.hopto.org> writes:

>> Depends on the "split" used. With 2 GB : 2 GB you can have all-lowmem
>> 1.5 GB RAM, without CONFIG_HIGHMEM*. 2 GB of per-process address space
>> is usually not a problem.
> How do you implement that? What do you mean 2GB:2GB split ?

See "make menuconfig", Processor type and features -> Memory split. You
need to select "EMBEDDED" and "EXPERIMENTAL" first. What you need for
1.5 GB RAM is VMSPLIT_2G.

The idea is that the CPU address space is divided: ca. 2 GB (in this
configuration) for user space (for each process - instead of 3 GB),
2 GB - 128 MB (or something like that, I don't remember exactly) for
physical RAM, and the last 128 MB or so for PCI devices and other
things.
--

-- 
Krzysztof Halasa

Gmane