1. 09 Apr, 2006 8 commits
  2. 01 Apr, 2006 9 commits
  3. 31 Mar, 2006 1 commit
  4. 30 Mar, 2006 1 commit
    • Jens Axboe's avatar
      [PATCH] Introduce sys_splice() system call · 5274f052
      Jens Axboe authored
      This adds support for the sys_splice system call. Using a pipe as a
      transport, it can connect to files or sockets (latter as output only).
      From the splice.c comments:
         "splice": joining two ropes together by interweaving their strands.
         This is the "extended pipe" functionality, where a pipe is used as
         an arbitrary in-memory buffer. Think of a pipe as a small kernel
         buffer that you can use to transfer data from one end to the other.
         The traditional unix read/write is extended with a "splice()" operation
         that transfers data buffers to or from a pipe buffer.
         Named by Larry McVoy, original implementation from Linus, extended by
         Jens to support splicing to files and fixing the initial implementation
      Signed-off-by: default avatarJens Axboe <axboe@suse.de>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
  5. 29 Mar, 2006 3 commits
    • Denis Vlasenko's avatar
      [NET]: Deinline some larger functions from netdevice.h · 56079431
      Denis Vlasenko authored
      On a allyesconfig'ured kernel:
      Size  Uses Wasted Name and definition
      ===== ==== ====== ================================================
         95  162  12075 netif_wake_queue      include/linux/netdevice.h
        129   86   9265 dev_kfree_skb_any     include/linux/netdevice.h
        127   56   5885 netif_device_attach   include/linux/netdevice.h
         73   86   4505 dev_kfree_skb_irq     include/linux/netdevice.h
         46   60   1534 netif_device_detach   include/linux/netdevice.h
        119   16   1485 __netif_rx_schedule   include/linux/netdevice.h
        143    5    492 netif_rx_schedule     include/linux/netdevice.h
         81    7    366 netif_schedule        include/linux/netdevice.h
      netif_wake_queue is big because __netif_schedule is a big inline:
      static inline void __netif_schedule(struct net_device *dev)
              if (!test_and_set_bit(__LINK_STATE_SCHED, &dev->state)) {
                      unsigned long flags;
                      struct softnet_data *sd;
                      sd = &__get_cpu_var(softnet_data);
                      dev->next_sched = sd->output_queue;
                      sd->output_queue = dev;
      static inline void netif_wake_queue(struct net_device *dev)
              if (netpoll_trap())
              if (test_and_clear_bit(__LINK_STATE_XOFF, &dev->state))
      By de-inlining __netif_schedule we are saving a lot of text
      at each callsite of netif_wake_queue and netif_schedule.
      __netif_rx_schedule is also big, and it makes more sense to keep
      both of them out of line.
      Patch also deinlines dev_kfree_skb_any. We can deinline dev_kfree_skb_irq
      instead... oh well.
      netif_device_attach/detach are not hot paths, we can deinline them too.
      Signed-off-by: default avatarDenis Vlasenko <vda@ilport.com.ua>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    • Randy Dunlap's avatar
      [DCCP]: Use NULL for pointers, comfort sparse. · 68907dad
      Randy Dunlap authored
      From: Randy Dunlap <rdunlap@xenotime.net>
      Use NULL instead of 0 for pointers.
      Fix these sparse warnings:
      net/dccp/feat.c:207:20: warning: Using plain integer as NULL pointer
      net/dccp/feat.c:325:21: warning: Using plain integer as NULL pointer
      net/dccp/feat.c:526:20: warning: Using plain integer as NULL pointer
      Signed-off-by: default avatarRandy Dunlap <rdunlap@xenotime.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    • Patrick Caulfield's avatar
      [DECNET]: Fix refcount · 6a57b2ee
      Patrick Caulfield authored
      From: Patrick Caulfield <patrick@tykepenguin.com>
      This patch fixes a bug in the reference counting for the default
      DECnet device.
      If the device is changed, then the new device had its refcount
      decremented rather than the old one!
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
  6. 28 Mar, 2006 9 commits
    • Andrew Morton's avatar
      [NETFILTER]: Rename init functions. · 65b4b4e8
      Andrew Morton authored
      Every netfilter module uses `init' for its module_init() function and
      `fini' or `cleanup' for its module_exit() function.
      Problem is, this creates uninformative initcall_debug output and makes
      ctags rather useless.
      So go through and rename them all to $(filename)_init and
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    • S P's avatar
      [TCP]: Fix RFC2465 typo. · c3e5d877
      S P authored
      Signed-off-by: default avatarS P <speattle@yahoo.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    • Herbert Xu's avatar
      [INET]: Introduce tunnel4/tunnel6 · d2acc347
      Herbert Xu authored
      Basically this patch moves the generic tunnel protocol stuff out of
      xfrm4_tunnel/xfrm6_tunnel and moves it into the new files of tunnel4.c
      and tunnel6 respectively.
      The reason for this is that the problem that Hugo uncovered is only
      the tip of the iceberg.  The real problem is that when we removed the
      dependency of ipip on xfrm4_tunnel we didn't really consider the module
      case at all.
      For instance, as it is it's possible to build both ipip and xfrm4_tunnel
      as modules and if the latter is loaded then ipip simply won't load.
      After considering the alternatives I've decided that the best way out of
      this is to restore the dependency of ipip on the non-xfrm-specific part
      of xfrm4_tunnel.  This is acceptable IMHO because the intention of the
      removal was really to be able to use ipip without the xfrm subsystem.
      This is still preserved by this patch.
      So now both ipip/xfrm4_tunnel depend on the new tunnel4.c which handles
      the arbitration between the two.  The order of processing is determined
      by a simple integer which ensures that ipip gets processed before
      The situation for ICMP handling is a little bit more complicated since
      we may not have enough information to determine who it's for.  It's not
      a big deal at the moment since the xfrm ICMP handlers are basically
      no-ops.  In future we can deal with this when we look at ICMP caching
      in general.
      The user-visible change to this is the removal of the TUNNEL Kconfig
      prompts.  This makes sense because it can only be used through IPCOMP
      as it stands.
      The addition of the new modules shouldn't introduce any problems since
      module dependency will cause them to be loaded.
      Oh and I also turned some unnecessary pskb's in IPv6 related to this
      patch to skb's.
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    • Denis Vlasenko's avatar
      [NET]: deinline 200+ byte inlines in sock.h · f0088a50
      Denis Vlasenko authored
      Sizes in bytes (allyesconfig, i386) and files where those inlines
      are used:
      238 sock_queue_rcv_skb 2.6.16/net/x25/x25_in.o
      238 sock_queue_rcv_skb 2.6.16/net/rose/rose_in.o
      238 sock_queue_rcv_skb 2.6.16/net/packet/af_packet.o
      238 sock_queue_rcv_skb 2.6.16/net/netrom/nr_in.o
      238 sock_queue_rcv_skb 2.6.16/net/llc/llc_sap.o
      238 sock_queue_rcv_skb 2.6.16/net/llc/llc_conn.o
      238 sock_queue_rcv_skb 2.6.16/net/irda/af_irda.o
      238 sock_queue_rcv_skb 2.6.16/net/ipx/af_ipx.o
      238 sock_queue_rcv_skb 2.6.16/net/ipv6/udp.o
      238 sock_queue_rcv_skb 2.6.16/net/ipv6/raw.o
      238 sock_queue_rcv_skb 2.6.16/net/ipv4/udp.o
      238 sock_queue_rcv_skb 2.6.16/net/ipv4/raw.o
      238 sock_queue_rcv_skb 2.6.16/net/ipv4/ipmr.o
      238 sock_queue_rcv_skb 2.6.16/net/econet/econet.o
      238 sock_queue_rcv_skb 2.6.16/net/econet/af_econet.o
      238 sock_queue_rcv_skb 2.6.16/net/bluetooth/sco.o
      238 sock_queue_rcv_skb 2.6.16/net/bluetooth/l2cap.o
      238 sock_queue_rcv_skb 2.6.16/net/bluetooth/hci_sock.o
      238 sock_queue_rcv_skb 2.6.16/net/ax25/ax25_in.o
      238 sock_queue_rcv_skb 2.6.16/net/ax25/af_ax25.o
      238 sock_queue_rcv_skb 2.6.16/net/appletalk/ddp.o
      238 sock_queue_rcv_skb 2.6.16/drivers/net/pppoe.o
      276 sk_receive_skb 2.6.16/net/decnet/dn_nsp_in.o
      276 sk_receive_skb 2.6.16/net/dccp/ipv6.o
      276 sk_receive_skb 2.6.16/net/dccp/ipv4.o
      276 sk_receive_skb 2.6.16/net/dccp/dccp_ipv6.o
      276 sk_receive_skb 2.6.16/drivers/net/pppoe.o
      209 sk_dst_check 2.6.16/net/ipv6/ip6_output.o
      209 sk_dst_check 2.6.16/net/ipv4/udp.o
      209 sk_dst_check 2.6.16/net/decnet/dn_nsp_out.o
      Large inlines with multiple callers:
      Size  Uses Wasted Name and definition
      ===== ==== ====== ================================================
        238   21   4360 sock_queue_rcv_skb    include/net/sock.h
        109   10    801 sock_recv_timestamp   include/net/sock.h
        276    4    768 sk_receive_skb        include/net/sock.h
         94    8    518 __sk_dst_check        include/net/sock.h
        209    3    378 sk_dst_check  include/net/sock.h
        131    4    333 sk_setup_caps include/net/sock.h
        152    2    132 sk_stream_alloc_pskb  include/net/sock.h
        125    2    105 sk_stream_writequeue_purge    include/net/sock.h
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    • David S. Miller's avatar
      [ECONET]: Convert away from SOCKOPS_WRAPPED · 1d181831
      David S. Miller authored
      Just use a local econet_mutex instead.
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    • Petr Vandrovec's avatar
      [NET]: Fix ipx/econet/appletalk/irda ioctl crashes · f6c90b71
      Petr Vandrovec authored
      Fix kernel oopses whenever somebody issues compatible ioctl on AppleTalk,
      Econet, IPX or IRDA socket.  For AppleTalk/Econet/IRDA it restores state
      in which these sockets were before compat_ioctl was introduced to the socket
      ops, for IPX it implements support for 4 ioctls which were not implemented
      before - as these ioctls use structures which match between 32bit and 64bit
      userspace, no special code is needed, just call 64bit ioctl handler.
      Signed-off-by: default avatarPetr Vandrovec <petr@vandrovec.name>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    • Alexey Dobriyan's avatar
      [PATCH] Typo fixes · 7f927fcc
      Alexey Dobriyan authored
      Fix a lot of typos.  Eyeballed by jmc@ in OpenBSD.
      Signed-off-by: default avatarAlexey Dobriyan <adobriyan@gmail.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    • Arjan van de Ven's avatar
      [PATCH] Make most file operations structs in fs/ const · 4b6f5d20
      Arjan van de Ven authored
      This is a conversion to make the various file_operations structs in fs/
      const.  Basically a regexp job, with a few manual fixups
      The goal is both to increase correctness (harder to accidentally write to
      shared datastructures) and reducing the false sharing of cachelines with
      things that get dirty in .data (while .rodata is nicely read only and thus
      cache clean)
      Signed-off-by: default avatarArjan van de Ven <arjan@infradead.org>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    • Arjan van de Ven's avatar
      [PATCH] mark f_ops const in the inode · 99ac48f5
      Arjan van de Ven authored
      Mark the f_ops members of inodes as const, as well as fix the
      ripple-through this causes by places that copy this f_ops and then "do
      stuff" with it.
      Signed-off-by: default avatarArjan van de Ven <arjan@infradead.org>
      Signed-off-by: default avatarAlexey Dobriyan <adobriyan@gmail.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
  7. 27 Mar, 2006 9 commits
    • David Woodhouse's avatar
      [PATCH] softmac: reduce default rate to 11Mbps. · 2638fed7
      David Woodhouse authored
      We don't make much of an attempt to fall back to lower rates, and 54M
      just isn't reliable enough for many people. In fact, it's not clear we
      even set it to 11M if we're trying to associate with an 802.11b AP.
      This patch makes us default to 11M, which ought to work for most people.
      When we actually handle dynamic rate adjustment, we can reconsider the
      defaults -- but even then, probably it makes as much sense to start at
      11M and adjust it upwards as it does to start at 54M and reduce it.
      Signed-off-by: default avatarDavid Woodhouse <dwmw2@infradead.org>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
    • David Woodhouse's avatar
      [PATCH] softmac: reduce scan dwell time · 16f43527
      David Woodhouse authored
      It currently takes something like 8 seconds to do a scan, because we
      spend half a second on each channel. Reduce that time to 20ms per
      Signed-off-by: default avatarDavid Woodhouse <dwmw2@infradead.org>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
    • Larry Finger's avatar
      [PATCH] Minor (janitorial) change to ieee80211 · d94606e0
      Larry Finger authored
      The attached patch removes a potential problem from ieee80211_wx.c, by changing the name of routine
      ipw2100_translate_scan to ieee80211_translate_scan. The problem is minor as the routine is declared
      static; however, if it were made global, it would pollute the namespace.
      Signed-Off-By: default avatarLarry Finger <Larry.Finger@lwfinger.net>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
    • Alan Stern's avatar
      [PATCH] Notifier chain update: API changes · e041c683
      Alan Stern authored
      The kernel's implementation of notifier chains is unsafe.  There is no
      protection against entries being added to or removed from a chain while the
      chain is in use.  The issues were discussed in this thread:
      We noticed that notifier chains in the kernel fall into two basic usage
      	"Blocking" chains are always called from a process context
      	and the callout routines are allowed to sleep;
      	"Atomic" chains can be called from an atomic context and
      	the callout routines are not allowed to sleep.
      We decided to codify this distinction and make it part of the API.  Therefore
      this set of patches introduces three new, parallel APIs: one for blocking
      notifiers, one for atomic notifiers, and one for "raw" notifiers (which is
      really just the old API under a new name).  New kinds of data structures are
      used for the heads of the chains, and new routines are defined for
      registration, unregistration, and calling a chain.  The three APIs are
      explained in include/linux/notifier.h and their implementation is in
      With atomic and blocking chains, the implementation guarantees that the chain
      links will not be corrupted and that chain callers will not get messed up by
      entries being added or removed.  For raw chains the implementation provides no
      guarantees at all; users of this API must provide their own protections.  (The
      idea was that situations may come up where the assumptions of the atomic and
      blocking APIs are not appropriate, so it should be possible for users to
      handle these things in their own way.)
      There are some limitations, which should not be too hard to live with.  For
      atomic/blocking chains, registration and unregistration must always be done in
      a process context since the chain is protected by a mutex/rwsem.  Also, a
      callout routine for a non-raw chain must not try to register or unregister
      entries on its own chain.  (This did happen in a couple of places and the code
      had to be changed to avoid it.)
      Since atomic chains may be called from within an NMI handler, they cannot use
      spinlocks for synchronization.  Instead we use RCU.  The overhead falls almost
      entirely in the unregister routine, which is okay since unregistration is much
      less frequent that calling a chain.
      Here is the list of chains that we adjusted and their classifications.  None
      of them use the raw API, so for the moment it is only a placeholder.
      arch/i386/kernel/traps.c:		i386die_chain
      arch/ia64/kernel/traps.c:		ia64die_chain
      arch/powerpc/kernel/traps.c:		powerpc_die_chain
      arch/sparc64/kernel/traps.c:		sparc64die_chain
      arch/x86_64/kernel/traps.c:		die_chain
      drivers/char/ipmi/ipmi_si_intf.c:	xaction_notifier_list
      kernel/panic.c:				panic_notifier_list
      kernel/profile.c:			task_free_notifier
      net/bluetooth/hci_core.c:		hci_notifier
      net/ipv4/netfilter/ip_conntrack_core.c:	ip_conntrack_chain
      net/ipv4/netfilter/ip_conntrack_core.c:	ip_conntrack_expect_chain
      net/ipv6/addrconf.c:			inet6addr_chain
      net/netfilter/nf_conntrack_core.c:	nf_conntrack_chain
      net/netfilter/nf_conntrack_core.c:	nf_conntrack_expect_chain
      net/netlink/af_netlink.c:		netlink_chain
      arch/powerpc/platforms/pseries/reconfig.c:	pSeries_reconfig_chain
      arch/s390/kernel/process.c:		idle_chain
      arch/x86_64/kernel/process.c		idle_notifier
      drivers/base/memory.c:			memory_chain
      drivers/cpufreq/cpufreq.c		cpufreq_policy_notifier_list
      drivers/cpufreq/cpufreq.c		cpufreq_transition_notifier_list
      drivers/macintosh/adb.c:		adb_client_list
      drivers/macintosh/via-pmu.c		sleep_notifier_list
      drivers/macintosh/via-pmu68k.c		sleep_notifier_list
      drivers/macintosh/windfarm_core.c	wf_client_list
      drivers/usb/core/notify.c		usb_notifier_list
      drivers/video/fbmem.c			fb_notifier_list
      kernel/cpu.c				cpu_chain
      kernel/module.c				module_notify_list
      kernel/profile.c			munmap_notifier
      kernel/profile.c			task_exit_notifier
      kernel/sys.c				reboot_notifier_list
      net/core/dev.c				netdev_chain
      net/decnet/dn_dev.c:			dnaddr_chain
      net/ipv4/devinet.c:			inetaddr_chain
      It's possible that some of these classifications are wrong.  If they are,
      please let us know or submit a patch to fix them.  Note that any chain that
      gets called very frequently should be atomic, because the rwsem read-locking
      used for blocking chains is very likely to incur cache misses on SMP systems.
      (However, if the chain's callout routines may sleep then the chain cannot be
      The patch set was written by Alan Stern and Chandra Seetharaman, incorporating
      material written by Keith Owens and suggestions from Paul McKenney and Andrew
      [jes@sgi.com: restructure the notifier chain initialization macros]
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: default avatarChandra Seetharaman <sekharan@us.ibm.com>
      Signed-off-by: default avatarJes Sorensen <jes@sgi.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    • NeilBrown's avatar
      [PATCH] knfsd: Tidy up unix_domain_find · ad1b5229
      NeilBrown authored
      We shouldn't really compare &new->h with anything when new ==NULL, and gather
      three different if statements that all start
        if (rv ...
      into one large if.
      Signed-off-by: default avatarNeil Brown <neilb@suse.de>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    • Adrian Bunk's avatar
      [PATCH] fs/nfsd/export.c,net/sunrpc/cache.c: make needlessly global code static · 74cae61a
      Adrian Bunk authored
      We can now make some code static.
      Signed-off-by: default avatarAdrian Bunk <bunk@stusta.de>
      Cc: Neil Brown <neilb@suse.de>
      Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    • NeilBrown's avatar
      [PATCH] knfsd: Convert sunrpc_cache to use krefs · baab935f
      NeilBrown authored
      .. it makes some of the code nicer.
      Signed-off-by: default avatarNeil Brown <neilb@suse.de>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    • NeilBrown's avatar
      [PATCH] knfsd: Unexport cache_fresh and fix a small race · ebd0cb1a
      NeilBrown authored
      Cache_fresh is now only used in cache.c, so unexport it.
      Part of cache_fresh (setting CACHE_VALID) should really be done under the
      lock, while part (calling cache_revisit_request etc) must be done outside the
      lock.  So we split it up appropriately.
      Signed-off-by: default avatarNeil Brown <neilb@suse.de>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    • NeilBrown's avatar
      [PATCH] knfsd: An assortment of little fixes to the sunrpc cache code · 4013edea
      NeilBrown authored
      - in cache_check, h must be non-NULL as it has been de-referenced,
        so don't bother checking for NULL.
      - When a cache-item is updated, we need to call cache_revisit_request to see
        if there is a pending request waiting for that item.  We were using
        a transition to CACHE_VALID to see if that was needed, however that is
        wrong as an expired entry will still be marked 'valid' (as the data is valid
        and will need to be released).  So instead use an off transition for
        CACHE_PENDING which is exactly the right thing to test.
      - Add a little bit more debugging info.
      Signed-off-by: default avatarNeil Brown <neilb@suse.de>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>