17 Mar, 2008

5 commits


13 Mar, 2008

1 commit

  • Comparing with kernel 2.6.24, tbench result has regression with
    2.6.25-rc1.

    1) On 2 quad-core processor stoakley: 4%.
    2) On 4 quad-core processor tigerton: more than 30%.

    bisect located below patch.

    b4ce92775c2e7ff9cf79cca4e0a19c8c5fd6287b is first bad commit
    commit b4ce92775c2e7ff9cf79cca4e0a19c8c5fd6287b
    Author: Herbert Xu
    Date: Tue Nov 13 21:33:32 2007 -0800

    [IPV6]: Move nfheader_len into rt6_info

    The dst member nfheader_len is only used by IPv6. It's also currently
    creating a rather ugly alignment hole in struct dst. Therefore this patch
    moves it from there into struct rt6_info.

    Above patch changes the cache line alignment, especially member
    __refcnt. I did a testing by adding 2 unsigned long pading before
    lastuse, so the 3 members, lastuse/__refcnt/__use, are moved to next
    cache line. The performance is recovered.

    I created a patch to rearrange the members in struct dst_entry.

    With Eric and Valdis Kletnieks's suggestion, I made finer arrangement.

    1) Move tclassid under ops in case CONFIG_NET_CLS_ROUTE=y. So
    sizeof(dst_entry)=200 no matter if CONFIG_NET_CLS_ROUTE=y/n. I
    tested many patches on my 16-core tigerton by moving tclassid to
    different place. It looks like tclassid could also have impact on
    performance. If moving tclassid before metrics, or just don't move
    tclassid, the performance isn't good. So I move it behind metrics.

    2) Add comments before __refcnt.

    On 16-core tigerton:

    If CONFIG_NET_CLS_ROUTE=y, the result with below patch is about 18%
    better than the one without the patch;

    If CONFIG_NET_CLS_ROUTE=n, the result with below patch is about 30%
    better than the one without the patch.

    With 32bit 2.6.25-rc1 on 8-core stoakley, the new patch doesn't
    introduce regression.

    Thank Eric, Valdis, and David!

    Signed-off-by: Zhang Yanmin
    Acked-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Zhang Yanmin
     

12 Mar, 2008

7 commits


11 Mar, 2008

9 commits


08 Mar, 2008

2 commits

  • Signed-off-by: Kirill A. Shutemov
    Signed-off-by: David S. Miller

    Kirill A. Shutemov
     
  • Current /proc/net is done with so called "shadows", but current
    implementation is broken and has little chances to get fixed.

    The problem is that dentries subtree of /proc/net directory has
    fancy revalidation rules to make processes living in different
    net namespaces see different entries in /proc/net subtree, but
    currently, tasks see in the /proc/net subdir the contents of any
    other namespace, depending on who opened the file first.

    The proposed fix is to turn /proc/net into a symlink, which points
    to /proc/self/net, which in turn shows what previously was in
    /proc/net - the network-related info, from the net namespace the
    appropriate task lives in.

    # ls -l /proc/net
    lrwxrwxrwx 1 root root 8 Mar 5 15:17 /proc/net -> self/net

    In other words - this behaves like /proc/mounts, but unlike
    "mounts", "net" is not a file, but a directory.

    Changes from v2:
    * Fixed discrepancy of /proc/net nlink count and selinux labeling
    screwup pointed out by Stephen.

    To get the correct nlink count the ->getattr callback for /proc/net
    is overridden to read one from the net->proc_net entry.

    To make selinux still work the net->proc_net entry is initialized
    properly, i.e. with the "net" name and the proc_net parent.

    Selinux fixes are
    Acked-by: Stephen Smalley

    Changes from v1:
    * Fixed a task_struct leak in get_proc_task_net, pointed out by Paul.

    Signed-off-by: Pavel Emelyanov
    Acked-by: "Eric W. Biederman"
    Signed-off-by: David S. Miller

    Pavel Emelyanov
     

06 Mar, 2008

16 commits

  • Fix rxrpc_recvmsg() to return msg_name correctly. We shouldn't
    overwrite the *msg struct, but should rather write into msg->msg_name
    (there's a '&' unary operator that shouldn't be there).

    Signed-off-by: David Howells
    Signed-off-by: Andrew Morton
    Signed-off-by: David S. Miller

    David Howells
     
  • Prevent oops on enc28j60 packet RX: make sure buffers are aligned.
    Not all architectures support unaligned accesses in kernel space.

    Signed-off-by: David Brownell
    Acked-by: Claudio Lanconelli
    Signed-off-by: David S. Miller

    David Brownell
     
  • Replace init_module and cleanup_module with static functions and
    module_init/module_exit.

    Signed-off-by: Jon Schindler
    Signed-off-by: Andrew Morton
    Signed-off-by: David S. Miller

    Jon Schindler
     
  • Replaced init_module and cleanup_module with static functions and
    module_init/module_exit.

    Signed-off-by: Jon Schindler
    Signed-off-by: Andrew Morton
    Signed-off-by: David S. Miller

    Jon Schindler
     
  • Replaced init_module and cleanup_module with static functions and
    module_init/module_exit.

    Signed-off-by: Jon Schindler
    Signed-off-by: Andrew Morton
    Signed-off-by: David S. Miller

    Jon Schindler
     
  • Replaced init_module and cleanup_module with static functions and
    module_init/module_exit.

    Signed-off-by: Jon Schindler
    Signed-off-by: Andrew Morton
    Signed-off-by: David S. Miller

    Jon Schindler
     
  • bnep_sock_cleanup() always returns 0 and its return value isn't used
    anywhere in the code.

    Signed-off-by: Tobias Klauser
    Signed-off-by: Andrew Morton
    Signed-off-by: David S. Miller

    Tobias Klauser
     
  • hci_sock_cleanup() always returns 0 and its return value isn't used
    anywhere in the code.

    Compile-tested with 'make allyesconfig && make net/bluetooth/bluetooth.ko'

    Signed-off-by: Tobias Klauser
    Signed-off-by: Andrew Morton
    Acked-by: Marcel Holtmann

    Tobias Klauser
     
  • Alon Bar-Lev reports:

    Feb 16 23:41:33 alon1 usb 3-1: configuration #1 chosen from 1 choice
    Feb 16 23:41:33 alon1 BUG: unable to handle kernel NULL pointer
    dereference at virtual address 00000008
    Feb 16 23:41:33 alon1 printing eip: c01b2db6 *pde = 00000000
    Feb 16 23:41:33 alon1 Oops: 0000 [#1] PREEMPT
    Feb 16 23:41:33 alon1 Modules linked in: ppp_deflate zlib_deflate
    zlib_inflate bsd_comp ppp_async rfcomm l2cap hci_usb vmnet(P)
    vmmon(P) tun radeon drm autofs4 ipv6 aes_generic crypto_algapi
    ieee80211_crypt_ccmp nf_nat_irc nf_nat_ftp nf_conntrack_irc
    nf_conntrack_ftp ipt_MASQUERADE iptable_nat nf_nat ipt_REJECT
    xt_tcpudp ipt_LOG xt_limit xt_state nf_conntrack_ipv4 nf_conntrack
    iptable_filter ip_tables x_tables snd_pcm_oss snd_mixer_oss
    snd_seq_dummy snd_seq_oss snd_seq_midi_event snd_seq snd_seq_device
    bluetooth ppp_generic slhc ioatdma dca cfq_iosched cpufreq_powersave
    cpufreq_ondemand cpufreq_conservative acpi_cpufreq freq_table uinput
    fan af_packet nls_cp1255 nls_iso8859_1 nls_utf8 nls_base pcmcia
    snd_intel8x0 snd_ac97_codec ac97_bus snd_pcm nsc_ircc snd_timer
    ipw2200 thinkpad_acpi irda snd ehci_hcd yenta_socket uhci_hcd
    psmouse ieee80211 soundcore intel_agp hwmon rsrc_nonstatic pcspkr
    e1000 crc_ccitt snd_page_alloc i2c_i801 ieee80211_crypt pcmcia_core
    agpgart thermal bat!
    tery nvram rtc sr_mod ac sg firmware_class button processor cdrom
    unix usbcore evdev ext3 jbd ext2 mbcache loop ata_piix libata sd_mod
    scsi_mod
    Feb 16 23:41:33 alon1
    Feb 16 23:41:33 alon1 Pid: 4, comm: events/0 Tainted: P
    (2.6.24-gentoo-r2 #1)
    Feb 16 23:41:33 alon1 EIP: 0060:[] EFLAGS: 00010282 CPU: 0
    Feb 16 23:41:33 alon1 EIP is at sysfs_get_dentry+0x26/0x80
    Feb 16 23:41:33 alon1 EAX: 00000000 EBX: 00000000 ECX: 00000000 EDX:
    f48a2210
    Feb 16 23:41:33 alon1 ESI: f72eb900 EDI: f4803ae0 EBP: f4803ae0 ESP:
    f7c49efc
    Feb 16 23:41:33 alon1 hcid[7004]: HCI dev 0 registered
    Feb 16 23:41:33 alon1 DS: 007b ES: 007b FS: 0000 GS: 0000 SS: 0068
    Feb 16 23:41:33 alon1 Process events/0 (pid: 4, ti=f7c48000
    task=f7c3efc0 task.ti=f7c48000)
    Feb 16 23:41:33 alon1 Stack: f7cb6140 f4822668 f7e71e10 c01b304d
    ffffffff ffffffff fffffffe c030ba9c
    Feb 16 23:41:33 alon1 f7cb6140 f4822668 f6da6720 f7cb6140 f4822668
    f6da6720 c030ba8e c01ce20b
    Feb 16 23:41:33 alon1 f6e9dd00 c030ba8e f6da6720 f6e9dd00 f6e9dd00
    00000000 f4822600 00000000
    Feb 16 23:41:33 alon1 Call Trace:
    Feb 16 23:41:33 alon1 [] sysfs_move_dir+0x3d/0x1f0
    Feb 16 23:41:33 alon1 [] kobject_move+0x9b/0x120
    Feb 16 23:41:33 alon1 [] device_move+0x51/0x110
    Feb 16 23:41:33 alon1 [] del_conn+0x0/0x70 [bluetooth]
    Feb 16 23:41:33 alon1 [] del_conn+0x19/0x70 [bluetooth]
    Feb 16 23:41:33 alon1 [] run_workqueue+0x81/0x140
    Feb 16 23:41:33 alon1 [] schedule+0x168/0x2e0
    Feb 16 23:41:33 alon1 [] autoremove_wake_function+0x0/0x50
    Feb 16 23:41:33 alon1 [] worker_thread+0x9b/0xf0
    Feb 16 23:41:33 alon1 [] autoremove_wake_function+0x0/0x50
    Feb 16 23:41:33 alon1 [] worker_thread+0x0/0xf0
    Feb 16 23:41:33 alon1 [] kthread+0x42/0x70
    Feb 16 23:41:33 alon1 [] kthread+0x0/0x70
    Feb 16 23:41:33 alon1 [] kernel_thread_helper+0x7/0x18
    Feb 16 23:41:33 alon1 =======================
    Feb 16 23:41:33 alon1 Code: 26 00 00 00 00 57 89 c7 a1 50 1b 3a c0
    56 53 8b 70 38 85 f6 74 08 8b 0e 85 c9 74 58 ff 06 8b 56 50 39 fa 74
    47 89 fb eb 02 89 c3 43 08 39 c2 75 f7 8b 46 08 83 c0 68 e8 98
    e7 10 00 8b 43 10
    Feb 16 23:41:33 alon1 EIP: [] sysfs_get_dentry+0x26/0x80
    SS:ESP 0068:f7c49efc
    Feb 16 23:41:33 alon1 ---[ end trace aae864e9592acc1d ]---

    Defer hci_unregister_sysfs because hci device could be destructed
    while hci conn devices still there.

    Signed-off-by: Dave Young
    Tested-by: Stefan Seyfried
    Acked-by: Alon Bar-Lev
    Signed-off-by: Andrew Morton
    Acked-by: Marcel Holtmann

    Dave Young
     
  • From: SDiZ

    Fix the CONWISE Technology based adapters with buggy SCO support issue
    (bugzilla #9027)

    Signed-off-by: Andrew Morton
    Acked-by: Marcel Holtmann
    Signed-off-by: David S. Miller

    SDiZ
     
  • When walking a session's packet reorder queue, use
    skb_queue_walk_safe() since the list could be modified inside the
    loop.

    Rearrange the unlinking skbs from the reorder queue such that it is
    done while the queue lock is held in pppol2tp_recv_dequeue() when
    walking the skb list.

    A version of this patch was suggested by Jarek Poplawski.

    Signed-off-by: James Chapman
    Signed-off-by: David S. Miller

    James Chapman
     
  • Fix locking issues in the pppol2tp driver which can cause a kernel
    crash on SMP boxes. There were two problems:-

    1. The driver was violating read_lock() and write_lock() scheduling
    rules because it wasn't using softirq-safe locks in softirq
    contexts. So we now consistently use the _bh variants of the lock
    functions.

    2. The driver was calling sk_dst_get() in pppol2tp_xmit() which was
    taking sk_dst_lock in softirq context. We now call __sk_dst_get().

    Signed-off-by: James Chapman
    Signed-off-by: David S. Miller

    James Chapman
     
  • __FUNCTION__ is gcc-specific, use __func__

    Signed-off-by: Harvey Harrison
    Signed-off-by: David S. Miller

    Harvey Harrison
     
  • Signed-off-by: Harvey Harrison
    Signed-off-by: Andrew Morton
    Signed-off-by: David S. Miller

    Harvey Harrison
     
  • Signed-off-by: Harvey Harrison
    Signed-off-by: Andrew Morton
    Signed-off-by: David S. Miller

    Harvey Harrison
     
  • Signed-off-by: Harvey Harrison
    Signed-off-by: Andrew Morton
    Signed-off-by: David S. Miller

    Harvey Harrison