12 Oct, 2016

1 commit

  • A good practice is to prefix the names of functions by the name
    of the subsystem.

    The kthread worker API is a mix of classic kthreads and workqueues. Each
    worker has a dedicated kthread. It runs a generic function that process
    queued works. It is implemented as part of the kthread subsystem.

    This patch renames the existing kthread worker API to use
    the corresponding name from the workqueues API prefixed by
    kthread_:

    __init_kthread_worker() -> __kthread_init_worker()
    init_kthread_worker() -> kthread_init_worker()
    init_kthread_work() -> kthread_init_work()
    insert_kthread_work() -> kthread_insert_work()
    queue_kthread_work() -> kthread_queue_work()
    flush_kthread_work() -> kthread_flush_work()
    flush_kthread_worker() -> kthread_flush_worker()

    Note that the names of DEFINE_KTHREAD_WORK*() macros stay
    as they are. It is common that the "DEFINE_" prefix has
    precedence over the subsystem names.

    Note that INIT() macros and init() functions use different
    naming scheme. There is no good solution. There are several
    reasons for this solution:

    + "init" in the function names stands for the verb "initialize"
    aka "initialize worker". While "INIT" in the macro names
    stands for the noun "INITIALIZER" aka "worker initializer".

    + INIT() macros are used only in DEFINE() macros

    + init() functions are used close to the other kthread()
    functions. It looks much better if all the functions
    use the same scheme.

    + There will be also kthread_destroy_worker() that will
    be used close to kthread_cancel_work(). It is related
    to the init() function. Again it looks better if all
    functions use the same naming scheme.

    + there are several precedents for such init() function
    names, e.g. amd_iommu_init_device(), free_area_init_node(),
    jump_label_init_type(), regmap_init_mmio_clk(),

    + It is not an argument but it was inconsistent even before.

    [arnd@arndb.de: fix linux-next merge conflict]
    Link: http://lkml.kernel.org/r/20160908135724.1311726-1-arnd@arndb.de
    Link: http://lkml.kernel.org/r/1470754545-17632-3-git-send-email-pmladek@suse.com
    Suggested-by: Andrew Morton
    Signed-off-by: Petr Mladek
    Cc: Oleg Nesterov
    Cc: Tejun Heo
    Cc: Ingo Molnar
    Cc: Peter Zijlstra
    Cc: Steven Rostedt
    Cc: "Paul E. McKenney"
    Cc: Josh Triplett
    Cc: Thomas Gleixner
    Cc: Jiri Kosina
    Cc: Borislav Petkov
    Cc: Michal Hocko
    Cc: Vlastimil Babka
    Signed-off-by: Arnd Bergmann
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Petr Mladek
     

23 Aug, 2016

2 commits

  • There is an assertion in __call_rcu() that checks only the bottom
    bit of the rcu_head pointer, rather than the bottom two (as might be
    expected for 32-bit systems) or the bottom three (as might be expected
    for 64-bit systems). This choice might be a bit surprising in these days
    of ubiquitous 32-bit and 64-bit systems. This commit therefore records
    the reason for this odd alignment check, namely that m68k guarantees
    only two-byte alignment despite being a 32-bit architectures.

    Signed-off-by: Paul E. McKenney

    Paul E. McKenney
     
  • CONFIG_RCU_TORTURE_TEST_RUNNABLE was removed by commit 4e9a073f60367
    ("torture: Remove CONFIG_RCU_TORTURE_TEST_RUNNABLE, simplify code"),
    but the documentation was not updated accordingly. This commit therefore
    updates the documentation to reflect CONFIG_RCU_TORTURE_TEST_RUNNABLE's
    removal and to add a description for the alternative module parameter.

    Signed-off-by: SeongJae Park
    Signed-off-by: Paul E. McKenney

    SeongJae Park
     

15 Jun, 2016

4 commits


20 May, 2016

1 commit

  • Pull Documentation updates from Jon Corbet:
    "A bit busier this time around.

    The most interesting thing (IMO) this time around is some beginning
    infrastructural work to allow documents to be written using
    restructured text. Maybe someday, in a galaxy far far away, we'll be
    able to eliminate the DocBook dependency and have a much better
    integrated set of kernel docs. Someday.

    Beyond that, there's a new document on security hardening from Kees,
    the movement of some sample code over to samples/, a number of
    improvements to the serial docs from Geert, and the usual collection
    of corrections, typo fixes, etc"

    * tag 'docs-for-linus' of git://git.lwn.net/linux: (55 commits)
    doc: self-protection: provide initial details
    serial: doc: Use port->state instead of info
    serial: doc: Always refer to tty_port->mutex
    Documentation: vm: Spelling s/paltform/platform/g
    Documentation/memcg: update kmem limit doc as codes behavior
    docproc: print a comment about autogeneration for rst output
    docproc: add support for reStructuredText format via --rst option
    docproc: abstract terminating lines at first space
    docproc: abstract docproc directive detection
    docproc: reduce unnecessary indentation
    docproc: add variables for subcommand and filename
    kernel-doc: use rst C domain directives and references for types
    kernel-doc: produce RestructuredText output
    kernel-doc: rewrite usage description, remove duplicated comments
    Doc: correct the location of sysrq.c
    Documentation: fix common spelling mistakes
    samples: v4l: from Documentation to samples directory
    samples: connector: from Documentation to samples directory
    Documentation: xillybus: fix spelling mistake
    Documentation: x86: fix spelling mistakes
    ...

    Linus Torvalds
     

28 Apr, 2016

1 commit


22 Apr, 2016

1 commit


20 Apr, 2016

1 commit


01 Apr, 2016

10 commits


06 Dec, 2015

7 commits


08 Oct, 2015

1 commit


07 Oct, 2015

3 commits

  • This commit rids the documentation of long-obsolete torture_type options
    such as rcu_sync and adds new ones such as tasks. Also add verbiage
    noting the fact that rcutorture now concurrently tests the asynchrounous,
    synchronous, expedited synchronous, and polling grace-period primitives.

    Reported-by: David Miller
    Signed-off-by: Paul E. McKenney
    Acked-by: David Miller
    Reviewed-by: Josh Triplett

    Paul E. McKenney
     
  • As there is lots of misinformation and outdated information on the
    Internet about nearly all topics related to the kernel, I thought it
    would be best if I based my RCU code on the guidelines of the examples
    in the Documentation/ tree of the latest kernel. One thing that stuck
    out when reading the whatisRCU.txt document was, "interesting how we
    don't need any function to dereference rcu protected pointers when doing
    updates if a lock is held. I wonder how static analyzers will work with
    that." Then, a few weeks later, upon discovering sparse's __rcu support,
    I ran it over my code, and lo and behold, things weren't done right.
    Examining other RCU usages in the kernel reveal consistent usage of
    rcu_dereference_protected, passing in lockdep_is_held as the
    conditional. So, this patch adds that idiom to the documentation, so
    that others ahead of me won't endure the same exercise.

    Signed-off-by: Jason A. Donenfeld
    Signed-off-by: Paul E. McKenney
    Reviewed-by: Josh Triplett

    Jason A. Donenfeld
     
  • The Linux kernel outputs copious text during boot, and a slow serial
    console can result in stall warnings, particularly when messages are
    printed with interrupts disabled. This commit adds this to the list
    of causes of RCU CPU stall warning messages.

    Signed-off-by: Paul E. McKenney
    Reviewed-by: Josh Triplett

    Paul E. McKenney
     

21 Sep, 2015

1 commit


04 Aug, 2015

2 commits


23 Jul, 2015

1 commit


18 Jul, 2015

3 commits


16 Jul, 2015

1 commit