1. 16 4月, 2015 2 次提交
    • C
      blk-mq: reduce unnecessary software queue looping · 889fa31f
      Chong Yuan 提交于
      In flush_busy_ctxs() and blk_mq_hctx_has_pending(), regardless of how many
      ctxs assigned to one hctx, they will all loop hctx->ctx_map.map_size
      times. Here hctx->ctx_map.map_size is a const ALIGN(nr_cpu_ids, 8) / 8.
      Especially, flush_busy_ctxs() is in hot code path. And it's unnecessary.
      Change ->map_size to contain the actually mapped software queues, so we
      only loop for as many iterations as we have to.
      
      And remove cpumask setting and nr_ctx count in blk_mq_init_cpu_queues()
      since they are all re-done in blk_mq_map_swqueue().
      blk_mq_map_swqueue().
      Signed-off-by: NChong Yuan <chong.yuan@memblaze.com>
      Reviewed-by: NWenbo Wang <wenbo.wang@memblaze.com>
      
      Updated by me for formatting and commenting.
      Signed-off-by: NJens Axboe <axboe@fb.com>
      889fa31f
    • J
      aio: fix serial draining in exit_aio() · dc48e56d
      Jens Axboe 提交于
      exit_aio() currently serializes killing io contexts. Each context
      killing ends up having to do percpu_ref_kill(), which in turns has
      to wait for an RCU grace period. This can take a long time, depending
      on the number of contexts. And there's no point in doing them serially,
      when we could be waiting for all of them in one fell swoop.
      
      This patches makes my fio thread offload test case exit 0.2s instead
      of almost 6s.
      Reviewed-by: NJeff Moyer <jmoyer@redhat.com>
      Signed-off-by: NJens Axboe <axboe@fb.com>
      dc48e56d
  2. 10 4月, 2015 1 次提交
  3. 30 3月, 2015 2 次提交
  4. 25 3月, 2015 1 次提交
  5. 13 3月, 2015 24 次提交
  6. 12 3月, 2015 3 次提交
    • L
      mm: fix up numa read-only thread grouping logic · 53da3bc2
      Linus Torvalds 提交于
      Dave Chinner reported that commit 4d942466 ("mm: convert
      p[te|md]_mknonnuma and remaining page table manipulations") slowed down
      his xfsrepair test enormously.  In particular, it was using more system
      time due to extra TLB flushing.
      
      The ultimate reason turns out to be how the change to use the regular
      page table accessor functions broke the NUMA grouping logic.  The old
      special mknuma/mknonnuma code accessed the page table present bit and
      the magic NUMA bit directly, while the new code just changes the page
      protections using PROT_NONE and the regular vma protections.
      
      That sounds equivalent, and from a fault standpoint it really is, but a
      subtle side effect is that the *other* protection bits of the page table
      entries also change.  And the code to decide how to group the NUMA
      entries together used the writable bit to decide whether a particular
      page was likely to be shared read-only or not.
      
      And with the change to make the NUMA handling use the regular permission
      setting functions, that writable bit was basically always cleared for
      private mappings due to COW.  So even if the page actually ends up being
      written to in the end, the NUMA balancing would act as if it was always
      shared RO.
      
      This code is a heuristic anyway, so the fix - at least for now - is to
      instead check whether the page is dirty rather than writable.  The bit
      doesn't change with protection changes.
      
      NOTE! This also adds a FIXME comment to revisit this issue,
      
      Not only should we probably re-visit the whole "is this a shared
      read-only page" heuristic (we might want to take the vma permissions
      into account and base this more on those than the per-page ones, and
      also look at whether the particular access that triggers it is a write
      or not), but the whole COW issue shows that we should think about the
      NUMA fault handling some more.
      
      For example, maybe we should do the early-COW thing that a regular fault
      does.  Or maybe we should accept that while using the same bits as
      PROTNONE was a good thing (and got rid of the specual NUMA bit), we
      might still want to just preseve the other protection bits across NUMA
      faulting.
      
      Those are bigger questions, left for later.  This just fixes up the
      heuristic so that it at least approximates working again.  More analysis
      and work needed.
      Reported-by: NDave Chinner <david@fromorbit.com>
      Tested-by: NMel Gorman <mgorman@suse.de>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Aneesh Kumar <aneesh.kumar@linux.vnet.ibm.com>
      Cc: Ingo Molnar <mingo@kernel.org>,
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      53da3bc2
    • J
      Revert "i2c: core: Dispose OF IRQ mapping at client removal time" · a4944572
      Jakub Kicinski 提交于
      This reverts commit e4df3a0b
      ("i2c: core: Dispose OF IRQ mapping at client removal time")
      
      Calling irq_dispose_mapping() will destroy the mapping and disassociate
      the IRQ from the IRQ chip to which it belongs. Keeping it is OK, because
      existent mappings are reused properly.
      
      Also, this commit breaks drivers using devm* for IRQ management on
      OF-based systems because devm* cleanup happens in device code, after
      bus's remove() method returns.
      Signed-off-by: NJakub Kicinski <kubakici@wp.pl>
      Reported-by: NSébastien Szymanski <sebastien.szymanski@armadeus.com>
      Acked-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      Acked-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
      [wsa: updated the commit message with findings fromt the other bug report]
      Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
      Cc: stable@kernel.org
      Fixes: e4df3a0b
      a4944572
    • C
      nios2: update pt_regs · 92d5dd8c
      Chung-Ling Tang 提交于
      Remove struct pt_regs from user header and use generic ucontext.h.
      Signed-off-by: NChung-Ling Tang <cltang@codesourcery.com>
      Acked-by: NLey Foon Tan <lftan@altera.com>
      92d5dd8c
  7. 11 3月, 2015 2 次提交
  8. 10 3月, 2015 5 次提交
    • L
      Merge git://git.kernel.org/pub/scm/virt/kvm/kvm · affb8172
      Linus Torvalds 提交于
      Pull kvm/s390 bugfixes from Marcelo Tosatti.
      
      * git://git.kernel.org/pub/scm/virt/kvm/kvm:
        KVM: s390: non-LPAR case obsolete during facilities mask init
        KVM: s390: include guest facilities in kvm facility test
        KVM: s390: fix in memory copy of facility lists
        KVM: s390/cpacf: Fix kernel bug under z/VM
        KVM: s390/cpacf: Enable key wrapping by default
      affb8172
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux · ec0e6bd3
      Linus Torvalds 提交于
      Pull s390 fixes from Martin Schwidefsky:
       "One performance optimization for page_clear and a couple of bug fixes"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
        s390/mm: fix incorrect ASCE after crst_table_downgrade
        s390/ftrace: fix crashes when switching tracers / add notrace to cpu_relax()
        s390/pci: unify pci_iomap symbol exports
        s390/pci: fix [un]map_resources sequence
        s390: let the compiler do page clearing
        s390/pci: fix possible information leak in mmio syscall
        s390/dcss: array index 'i' is used before limits check.
        s390/scm_block: fix off by one during cluster reservation
        s390/jump label: improve and fix sanity check
        s390/jump label: add missing jump_label_apply_nops() call
      ec0e6bd3
    • L
      Merge tag 'trace-fixes-v4.0-rc2-2' of... · e7901af1
      Linus Torvalds 提交于
      Merge tag 'trace-fixes-v4.0-rc2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace
      
      Pull seq-buf/ftrace fixes from Steven Rostedt:
       "This includes fixes for seq_buf_bprintf() truncation issue.  It also
        contains fixes to ftrace when /proc/sys/kernel/ftrace_enabled and
        function tracing are started.  Doing the following causes some issues:
      
          # echo 0 > /proc/sys/kernel/ftrace_enabled
          # echo function_graph > /sys/kernel/debug/tracing/current_tracer
          # echo 1 > /proc/sys/kernel/ftrace_enabled
          # echo nop > /sys/kernel/debug/tracing/current_tracer
          # echo function_graph > /sys/kernel/debug/tracing/current_tracer
      
        As well as with function tracing too.  Pratyush Anand first reported
        this issue to me and supplied a patch.  When I tested this on my x86
        test box, it caused thousands of backtraces and warnings to appear in
        dmesg, which also caused a denial of service (a warning for every
        function that was listed).  I applied Pratyush's patch but it did not
        fix the issue for me.  I looked into it and found a slight problem
        with trampoline accounting.  I fixed it and sent Pratyush a patch, but
        he said that it did not fix the issue for him.
      
        I later learned tha Pratyush was using an ARM64 server, and when I
        tested on my ARM board, I was able to reproduce the same issue as
        Pratyush.  After applying his patch, it fixed the problem.  The above
        test uncovered two different bugs, one in x86 and one in ARM and
        ARM64.  As this looked like it would affect PowerPC, I tested it on my
        PPC64 box.  It too broke, but neither the patch that fixed ARM or x86
        fixed this box (the changes were all in generic code!).  The above
        test, uncovered two more bugs that affected PowerPC.  Again, the
        changes were only done to generic code.  It's the way the arch code
        expected things to be done that was different between the archs.  Some
        where more sensitive than others.
      
        The rest of this series fixes the PPC bugs as well"
      
      * tag 'trace-fixes-v4.0-rc2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
        ftrace: Fix ftrace enable ordering of sysctl ftrace_enabled
        ftrace: Fix en(dis)able graph caller when en(dis)abling record via sysctl
        ftrace: Clear REGS_EN and TRAMP_EN flags on disabling record via sysctl
        seq_buf: Fix seq_buf_bprintf() truncation
        seq_buf: Fix seq_buf_vprintf() truncation
      e7901af1
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 36bef883
      Linus Torvalds 提交于
      Pull networking fixes from David Miller:
      
       1) nft_compat accidently truncates ethernet protocol to 8-bits, from
          Arturo Borrero.
      
       2) Memory leak in ip_vs_proc_conn(), from Julian Anastasov.
      
       3) Don't allow the space required for nftables rules to exceed the
          maximum value representable in the dlen field.  From Patrick
          McHardy.
      
       4) bcm63xx_enet can accidently leave interrupts permanently disabled
          due to errors in the NAPI polling exit logic.  Fix from Nicolas
          Schichan.
      
       5) Fix OOPSes triggerable by the ping protocol module, due to missing
          address family validations etc.  From Lorenzo Colitti.
      
       6) Don't use RCU locking in sleepable context in team driver, from Jiri
          Pirko.
      
       7) xen-netback miscalculates statistic offset pointers when reporting
          the stats to userspace.  From David Vrabel.
      
       8) Fix a leak of up to 256 pages per VIF destroy in xen-netaback, also
          from David Vrabel.
      
       9) ip_check_defrag() cannot assume that skb_network_offset(),
          particularly when it is used by the AF_PACKET fanout defrag code.
          From Alexander Drozdov.
      
      10) gianfar driver doesn't query OF node names properly when trying to
          determine the number of hw queues available.  Fix it to explicitly
          check for OF nodes named queue-group.  From Tobias Waldekranz.
      
      11) MID field in macb driver should be 12 bits, not 16.  From Punnaiah
          Choudary Kalluri.
      
      12) Fix unintentional regression in traceroute due to timestamp socket
          option changes.  Empty ICMP payloads should be allowed in
          non-timestamp cases.  From Willem de Bruijn.
      
      13) When devices are unregistered, we have to get rid of AF_PACKET
          multicast list entries that point to it via ifindex.  Fix from
          Francesco Ruggeri.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (38 commits)
        tipc: fix bug in link failover handling
        net: delete stale packet_mclist entries
        net: macb: constify macb configuration data
        MAINTAINERS: add Marc Kleine-Budde as co maintainer for CAN networking layer
        MAINTAINERS: linux-can moved to github
        can: kvaser_usb: Read all messages in a bulk-in URB buffer
        can: kvaser_usb: Avoid double free on URB submission failures
        can: peak_usb: fix missing ctrlmode_ init for every dev
        can: add missing initialisations in CAN related skbuffs
        ip: fix error queue empty skb handling
        bgmac: Clean warning messages
        tcp: align tcp_xmit_size_goal() on tcp_tso_autosize()
        net: fec: fix unbalanced clk disable on driver unbind
        net: macb: Correct the MID field length value
        net: gianfar: correctly determine the number of queue groups
        ipv4: ip_check_defrag should not assume that skb_network_offset is zero
        net: bcmgenet: properly disable password matching
        net: eth: xgene: fix booting with devicetree
        bnx2x: Force fundamental reset for EEH recovery
        xen-netback: refactor xenvif_handle_frag_list()
        ...
      36bef883
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input · e93df634
      Linus Torvalds 提交于
      Pull input subsystem fixes from Dmitry Torokhov:
       "Miscellaneous driver fixes"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
        Input: psmouse - disable "palm detection" in the focaltech driver
        Input: psmouse - disable changing resolution/rate/scale for FocalTech
        Input: psmouse - ensure that focaltech reports consistent coordinates
        Input: psmouse - remove hardcoded touchpad size from the focaltech driver
        Input: tc3589x-keypad - set IRQF_ONESHOT flag to ensure IRQ request
        Input: ALPS - fix memory leak when detection fails
        Input: sun4i-ts - add thermal driver dependency
        Input: cyapa - remove superfluous type check in cyapa_gen5_read_idac_data()
        Input: cyapa - fix unaligned functions redefinition error
        Input: mma8450 - add parent device
      e93df634