07 Nov, 2015

3 commits

  • jffs2_garbage_collect_thread() does allow_signal(SIGCONT) for no reason,
    SIGCONT will wake a stopped task up even if it is ignored.

    Signed-off-by: Oleg Nesterov
    Reviewed-by: Tejun Heo
    Cc: David Woodhouse
    Cc: Felipe Balbi
    Cc: Markus Pargmann
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Oleg Nesterov
     
  • jffs2_garbage_collect_thread() can race with SIGCONT and sleep in
    TASK_STOPPED state after it was already sent. Add the new helper,
    kernel_signal_stop(), which does this correctly.

    Signed-off-by: Oleg Nesterov
    Reviewed-by: Tejun Heo
    Cc: David Woodhouse
    Cc: Felipe Balbi
    Cc: Markus Pargmann
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Oleg Nesterov
     
  • 1. Rename dequeue_signal_lock() to kernel_dequeue_signal(). This
    matches another "for kthreads only" kernel_sigaction() helper.

    2. Remove the "tsk" and "mask" arguments, they are always current
    and current->blocked. And it is simply wrong if tsk != current.

    3. We could also remove the 3rd "siginfo_t *info" arg but it looks
    potentially useful. However we can simplify the callers if we
    change kernel_dequeue_signal() to accept info => NULL.

    4. Remove _irqsave, it is never called from atomic context.

    Signed-off-by: Oleg Nesterov
    Reviewed-by: Tejun Heo
    Cc: David Woodhouse
    Cc: Felipe Balbi
    Cc: Markus Pargmann
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Oleg Nesterov
     

07 Jun, 2014

1 commit

  • jffs2_garbage_collect_thread() does disallow_signal(SIGHUP) around
    jffs2_garbage_collect_pass() and the comment says "We don't want SIGHUP
    to interrupt us".

    But disallow_signal() can't ensure that jffs2_garbage_collect_pass()
    won't be interrupted by SIGHUP, the problem is that SIGHUP can be
    already pending when disallow_signal() is called, and in this case any
    interruptible sleep won't block.

    Note: this is in fact because disallow_signal() is buggy and should be
    fixed, see the next changes.

    But there is another reason why disallow_signal() is wrong: SIG_IGN set
    by disallow_signal() silently discards any SIGHUP which can be sent
    before the next allow_signal(SIGHUP).

    Change this code to use sigprocmask(SIG_UNBLOCK/SIG_BLOCK, SIGHUP).
    This even matches the old (and wrong) semantics allow/disallow had when
    this logic was written.

    Signed-off-by: Oleg Nesterov
    Cc: Peter Zijlstra
    Cc: Al Viro
    Cc: David Woodhouse
    Cc: Frederic Weisbecker
    Cc: Geert Uytterhoeven
    Cc: Ingo Molnar
    Cc: Mathieu Desnoyers
    Cc: Richard Weinberger
    Cc: Steven Rostedt
    Cc: Tejun Heo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Oleg Nesterov
     

27 Mar, 2012

3 commits

  • Use pr_fmt to prefix KBUILD_MODNAME to appropriate logging messages.

    Remove now unnecessary internal prefixes from formats.

    Signed-off-by: Joe Perches
    Signed-off-by: Artem Bityutskiy
    Signed-off-by: David Woodhouse

    Joe Perches
     
  • Use the more current logging style.

    Coalesce formats, align arguments.
    Convert uses of embedded function names to %s, __func__.

    A couple of long line checkpatch errors I don't care about exist.

    Signed-off-by: Joe Perches
    Signed-off-by: Artem Bityutskiy
    Signed-off-by: David Woodhouse

    Joe Perches
     
  • D1 and D2 macros are mostly uses to emit debugging messages.

    Convert the logging uses of D1 & D2 to jffs2_dbg(level, fmt, ...)
    to be a bit more consistent style with the rest of the kernel.

    All jffs2_dbg output is now at KERN_DEBUG where some of
    the previous uses were emitted at various KERN_s.

    Signed-off-by: Joe Perches
    Signed-off-by: Artem Bityutskiy
    Signed-off-by: David Woodhouse

    Joe Perches
     

08 Aug, 2010

1 commit


20 May, 2010

1 commit


04 Sep, 2009

1 commit


14 Feb, 2009

1 commit

  • I've noticed some pretty poor behavior on OLPC machines after bootup, when
    gdm/X are starting. The GCD monopolizes the scheduler (which in turns
    means it gets to do more nand i/o), which results in processes taking much
    much longer than they should to start.

    As an example, on an OLPC machine going from OFW to a usable X (via
    auto-login gdm) takes 2m 30s. The majority of this time is consumed by
    the switch into graphical mode. With this patch, we cut a full 60s off of
    bootup time. After bootup, things are much snappier as well.

    Note that we have seen a CRC node error with this patch that causes the machine
    to fail to boot, but we've also seen that problem without this patch.

    Signed-off-by: Andres Salomon
    Signed-off-by: Andrew Morton
    Signed-off-by: David Woodhouse

    Andres Salomon
     

31 Oct, 2008

1 commit


04 Dec, 2007

1 commit


23 Jul, 2007

1 commit


18 Jul, 2007

1 commit

  • Currently, the freezer treats all tasks as freezable, except for the kernel
    threads that explicitly set the PF_NOFREEZE flag for themselves. This
    approach is problematic, since it requires every kernel thread to either
    set PF_NOFREEZE explicitly, or call try_to_freeze(), even if it doesn't
    care for the freezing of tasks at all.

    It seems better to only require the kernel threads that want to or need to
    be frozen to use some freezer-related code and to remove any
    freezer-related code from the other (nonfreezable) kernel threads, which is
    done in this patch.

    The patch causes all kernel threads to be nonfreezable by default (ie. to
    have PF_NOFREEZE set by default) and introduces the set_freezable()
    function that should be called by the freezable kernel threads in order to
    unset PF_NOFREEZE. It also makes all of the currently freezable kernel
    threads call set_freezable(), so it shouldn't cause any (intentional)
    change of behaviour to appear. Additionally, it updates documentation to
    describe the freezing of tasks more accurately.

    [akpm@linux-foundation.org: build fixes]
    Signed-off-by: Rafael J. Wysocki
    Acked-by: Nigel Cunningham
    Cc: Pavel Machek
    Cc: Oleg Nesterov
    Cc: Gautham R Shenoy
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rafael J. Wysocki
     

10 Jul, 2007

1 commit


29 Jun, 2007

1 commit


25 Apr, 2007

1 commit

  • In particular, remove the bit in the LICENCE file about contacting
    Red Hat for alternative arrangements. Their errant IS department broke
    that arrangement a long time ago -- the policy of collecting copyright
    assignments from contributors came to an end when the plug was pulled on
    the servers hosting the project, without notice or reason.

    We do still dual-license it for use with eCos, with the GPL+exception
    licence approved by the FSF as being GPL-compatible. It's just that nobody
    has the right to license it differently.

    Signed-off-by: David Woodhouse

    David Woodhouse
     

08 Mar, 2007

1 commit

  • The garbage collection thread is strictly an optimisation. Everything it
    does would also be done just-in-time in the context of something in
    userspace trying to access the file system.

    Sometimes, however, it's a pessimisation. Especially during early boot
    when it's checksumming nodes and scanning inodes which are shortly going
    to be pulled in by read_inode anyway. We end up building the rbtree of
    node coverage twice for the same inode.

    By switching to yield() instead of cond_resched() in the main loop, we
    observe boot times on the OLPC system going down from about 100 seconds to
    60.

    Signed-off-by: David Woodhouse

    David Woodhouse
     

08 Dec, 2006

1 commit


01 Apr, 2006

1 commit


07 Nov, 2005

1 commit


31 Oct, 2005

1 commit

  • I recently picked up my older work to remove unnecessary #includes of
    sched.h, starting from a patch by Dave Jones to not include sched.h
    from module.h. This reduces the number of indirect includes of sched.h
    by ~300. Another ~400 pointless direct includes can be removed after
    this disentangling (patch to follow later).
    However, quite a few indirect includes need to be fixed up for this.

    In order to feed the patches through -mm with as little disturbance as
    possible, I've split out the fixes I accumulated up to now (complete for
    i386 and x86_64, more archs to follow later) and post them before the real
    patch. This way this large part of the patch is kept simple with only
    adding #includes, and all hunks are independent of each other. So if any
    hunk rejects or gets in the way of other patches, just drop it. My scripts
    will pick it up again in the next round.

    Signed-off-by: Tim Schmielau
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tim Schmielau
     

27 Jun, 2005

1 commit


26 Jun, 2005

1 commit


23 May, 2005

2 commits


17 Apr, 2005

1 commit

  • Initial git repository build. I'm not bothering with the full history,
    even though we have it. We can create a separate "historical" git
    archive of that later if we want to, and in the meantime it's about
    3.2GB when imported into git - space that would just make the early
    git days unnecessarily complicated, when we don't have a lot of good
    infrastructure for it.

    Let it rip!

    Linus Torvalds