1. 10 8月, 2010 14 次提交
  2. 07 8月, 2010 3 次提交
    • J
      console: Fix compilation regression · 9261ec1a
      Jason Wessel 提交于
      A regression of building without CONFIG_HW_CONSOLE was introduced with
      commit b45cfba4 (vt,console,kdb:
      implement atomic console enter/leave functions).
      
      ERROR: "con_debug_enter" [drivers/serial/kgdboc.ko] undefined!
      ERROR: "vc_cons" [drivers/serial/kgdboc.ko] undefined!
      ERROR: "fg_console" [drivers/serial/kgdboc.ko] undefined!
      ERROR: "con_debug_leave" [drivers/serial/kgdboc.ko] undefined!
      
      When there is no HW console the con_debug_enter and con_debug_leave
      functions should have no code.
      Signed-off-by: NJason Wessel <jason.wessel@windriver.com>
      CC: Jesse Barnes <jbarnes@virtuousgeek.org>
      Reported-by: NRandy Dunlap <randy.dunlap@oracle.com>
      9261ec1a
    • B
      NFS: Fix /proc/mount for legacy binary interface · d5eff1a3
      Bryan Schumaker 提交于
      Add a flag so we know if we mounted the NFS server using the legacy
      binary interface.  If we used the legacy interface, then we should not
      show the mountd options.
      Signed-off-by: NBryan Schumaker <bjschuma@netapp.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      d5eff1a3
    • D
      Fix init ordering of /dev/console vs callers of modprobe · 31d1d48e
      David Howells 提交于
      Make /dev/console get initialised before any initialisation routine that
      invokes modprobe because if modprobe fails, it's going to want to open
      /dev/console, presumably to write an error message to.
      
      The problem with that is that if the /dev/console driver is not yet
      initialised, the chardev handler will call request_module() to invoke
      modprobe, which will fail, because we never compile /dev/console as a
      module.
      
      This will lead to a modprobe loop, showing the following in the kernel
      log:
      
      	request_module: runaway loop modprobe char-major-5-1
      	request_module: runaway loop modprobe char-major-5-1
      	request_module: runaway loop modprobe char-major-5-1
      	request_module: runaway loop modprobe char-major-5-1
      	request_module: runaway loop modprobe char-major-5-1
      
      This can happen, for example, when the built in md5 module can't find
      the built in cryptomgr module (because the latter fails to initialise).
      The md5 module comes before the call to tty_init(), presumably because
      'crypto' comes before 'drivers' alphabetically.
      
      Fix this by calling tty_init() from chrdev_init().
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      31d1d48e
  3. 06 8月, 2010 7 次提交
  4. 05 8月, 2010 8 次提交
  5. 04 8月, 2010 8 次提交
    • T
      SUNRPC: Move the bound cred to struct rpc_rqst · a17c2153
      Trond Myklebust 提交于
      This will allow us to save the original generic cred in rpc_message, so
      that if we migrate from one server to another, we can generate a new bound
      cred without having to punt back to the NFS layer.
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      a17c2153
    • T
      SUNRPC: Clean up of rpc_bindcred() · 8572b8e2
      Trond Myklebust 提交于
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      8572b8e2
    • T
      SUNRPC: Move remaining RPC client related task initialisation into clnt.c · 58f9612c
      Trond Myklebust 提交于
      Now that rpc_run_task() is the sole entry point for RPC calls, we can move
      the remaining rpc_client-related initialisation of struct rpc_task from
      sched.c into clnt.c.
      
      Also move rpc_killall_tasks() into the same file, since that too is
      relative to the rpc_clnt.
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      58f9612c
    • T
      SUNRPC: Ensure that rpc_exit() always wakes up a sleeping task · d9b6cd94
      Trond Myklebust 提交于
      Make rpc_exit() non-inline, and ensure that it always wakes up a task that
      has been queued.
      
      Kill off the now unused rpc_wake_up_task().
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      d9b6cd94
    • T
      SUNRPC: Make the credential cache hashtable size configurable · 241269bd
      Trond Myklebust 提交于
      This patch allows the user to configure the credential cache hashtable size
      using a new module parameter: auth_hashtable_size
      When set, this parameter will be rounded up to the nearest power of two,
      with a maximum allowed value of 1024 elements.
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      241269bd
    • T
      SUNRPC: Store the hashtable size in struct rpc_cred_cache · 988664a0
      Trond Myklebust 提交于
      Cleanup in preparation for allowing the user to determine the maximum hash
      table size.
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      988664a0
    • T
    • P
      timer: Added usleep_range timer · 5e7f5a17
      Patrick Pannuto 提交于
      usleep_range is a finer precision implementations of msleep
      and is designed to be a drop-in replacement for udelay where
      a precise sleep / busy-wait is unnecessary.
      
      Since an easy interface to hrtimers could lead to an undesired
      proliferation of interrupts, we provide only a "range" API,
      forcing the caller to think about an acceptable tolerance on
      both ends and hopefully avoiding introducing another interrupt.
      
      INTRO
      
      As discussed here ( http://lkml.org/lkml/2007/8/3/250 ), msleep(1) is not
      precise enough for many drivers (yes, sleep precision is an unfair notion,
      but consistently sleeping for ~an order of magnitude greater than requested
      is worth fixing). This patch adds a usleep API so that udelay does not have
      to be used. Obviously not every udelay can be replaced (those in atomic
      contexts or being used for simple bitbanging come to mind), but there are
      many, many examples of
      
      mydriver_write(...)
      /* Wait for hardware to latch */
      udelay(100)
      
      in various drivers where a busy-wait loop is neither beneficial nor
      necessary, but msleep simply does not provide enough precision and people
      are using a busy-wait loop instead.
      
      CONCERNS FROM THE RFC
      
      Why is udelay a problem / necessary? Most callers of udelay are in device/
      driver initialization code, which is serial...
      
      	As I see it, there is only benefit to sleeping over a delay; the
      	notion of "refactoring" areas that use udelay was presented, but
      	I see usleep as the refactoring. Consider i2c, if the bus is busy,
      	you need to wait a bit (say 100us) before trying again, your
      	current options are:
      
      		* udelay(100)
      		* msleep(1) <-- As noted above, actually as high as ~20ms
      				on some platforms, so not really an option
      		* Manually set up an hrtimer to try again in 100us (which
      		  is what usleep does anyway...)
      
      	People choose the udelay route because it is EASY; we need to
      	provide a better easy route.
      
      	Device / driver / boot code is *currently* serial, but every few
      	months someone makes noise about parallelizing boot, and IMHO, a
      	little forward-thinking now is one less thing to worry about
      	if/when that ever happens
      
      udelay's could be preempted
      
      	Sure, but if udelay plans on looping 1000 times, and it gets
      	preempted on loop 200, whenever it's scheduled again, it is
      	going to do the next 800 loops.
      
      Is the interruptible case needed?
      
      	Probably not, but I see usleep as a very logical parallel to msleep,
      	so it made sense to include the "full" API. Processors are getting
      	faster (albeit not as quickly as they are becoming more parallel),
      	so if someone wanted to be interruptible for a few usecs, why not
      	let them? If this is a contentious point, I'm happy to remove it.
      
      OTHER THOUGHTS
      
      I believe there is also value in exposing the usleep_range option; it gives
      the scheduler a lot more flexibility and allows the programmer to express
      his intent much more clearly; it's something I would hope future driver
      writers will take advantage of.
      
      To get the results in the NUMBERS section below, I literally s/udelay/usleep
      the kernel tree; I had to go in and undo the changes to the USB drivers, but
      everything else booted successfully; I find that extremely telling in and
      of itself -- many people are using a delay API where a sleep will suit them
      just fine.
      
      SOME ATTEMPTS AT NUMBERS
      
      It turns out that calculating quantifiable benefit on this is challenging,
      so instead I will simply present the current state of things, and I hope
      this to be sufficient:
      
      How many udelay calls are there in 2.6.35-rc5?
      
      	udealy(ARG) >=	| COUNT
      	1000		| 319
      	500		| 414
      	100		| 1146
      	20		| 1832
      
      I am working on Android, so that is my focus for this. The following table
      is a modified usleep that simply printk's the amount of time requested to
      sleep; these tests were run on a kernel with udelay >= 20 --> usleep
      
      "boot" is power-on to lock screen
      "power collapse" is when the power button is pushed and the device suspends
      "resume" is when the power button is pushed and the lock screen is displayed
               (no touchscreen events or anything, just turning on the display)
      "use device" is from the unlock swipe to clicking around a bit; there is no
      	sd card in this phone, so fail loading music, video, camera
      
      	ACTION		| TOTAL NUMBER OF USLEEP CALLS	| NET TIME (us)
      	boot		| 22				| 1250
      	power-collapse	| 9				| 1200
      	resume		| 5				| 500
      	use device	| 59				| 7700
      
      The most interesting category to me is the "use device" field; 7700us of
      busy-wait time that could be put towards better responsiveness, or at the
      least less power usage.
      Signed-off-by: NPatrick Pannuto <ppannuto@codeaurora.org>
      Cc: apw@canonical.com
      Cc: corbet@lwn.net
      Cc: arjan@linux.intel.com
      Cc: Randy Dunlap <rdunlap@xenotime.net>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      5e7f5a17