lkml.org 
[lkml]   [2013]   [May]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [RFC PATCH 0/2] return value from shrinkers
    On Mon, 13 May 2013 16:16:33 +0200 Oskar Andero <oskar.andero@sonymobile.com> wrote:

    > In a previous discussion on lkml it was noted that the shrinkers use the
    > magic value "-1" to signal that something went wrong.
    >
    > This patch-set implements the suggestion of instead using errno.h values
    > to return something more meaningful.
    >
    > The first patch simply changes the check from -1 to any negative value and
    > updates the comment accordingly.
    >
    > The second patch updates the shrinkers to return an errno.h value instead
    > of -1. Since this one spans over many different areas I need input on what is
    > a meaningful return value. Right now I used -EBUSY on everything for consitency.
    >
    > What do you say? Is this a good idea or does it make no sense at all?

    I don't see much point in it, really. Returning an errno implies that
    the errno will eventually be returned to userspace. But that isn't the
    case, so such a change is somewhat misleading.

    If we want the capability to return more than a binary yes/no message
    to callers then yes, we could/should enumerate the shrinker return
    values. But as that is a different concept from errnos, it should be
    done with a different and shrinker-specific namespace.




    \
     
     \ /
      Last update: 2013-05-16 01:41    [W:4.340 / U:0.004 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site