[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Minios-devel] [UNIKRAFT PATCH] lib/vfscore: Add dependency to libuktime



Hi Costin,

On 14.10.19, 16:14, "Costin Lupu" <costin.lup@xxxxxxxxx> wrote:

    Hi Simon and Felipe,
    
    After thinking a bit more about this, I reached the conclusion that it
    might be better to make nolibc *imply* uktime. And let me tell you how I
    got there.
    
    I've sent some patches on the mailing list that make uktime more
    self-contained. This is necessary because both nolibc and newlib come
    with their own time-related type definitions and functions and it makes
    no sense to find a common ground between them. So basically what I did
    was to move the types defined by nolibc to uktime and disable newlib's
    types. With these patches (almost) all the time related type definitions
    are in uktime.
    
    We know from a previous patch that newlib does depend on uktime because
    it needs functions such as gettimeofday(). Now, the question is if
    nolibc should also depend on uktime?
    
    It should if we want tp keep nolibc as a proxy for the types defined by
    uktime. This is would be completely transparent for the user/developer.
    Whenever the developer would need the POSIX time-related types and
    functions he/she would just include their POSIX headers. If we use
    'imply' instead of 'depends' then he/she will even be able to disable
    uktime from menuconfig.
    
    The other option (what we do now) would be to skip setting any kind of
    relationship between nolibc and uktime and because of this the
    user/developer will have to know to enable/select both nolibc and uktime
    which can be confusing at the beginning.

I would prefer not to have a relationship between nolibc and uktime, in order 
to adhere to Unikraft's principle of modularity (and since there's plenty of 
functionality in noblic that does not require uktime). Pragmatically yes, that 
might be confusing to users who might not know to select both noblic and uktime 
if they need that functionality, so I guess the compromise would be to use the 
kconfig imply keyword such that when noblic is selected, uktime is as well, but 
it's still possible to deselect if needed. I'm not really happy about this, but 
I guess it'll have to do for now. Ultimately only advanced users should be 
using the menu -- for most other users we should be providing a simpler 
interface that hides these details, at which point we could revert this imply 
solution.

Would you send an additional patch to implement this?

-- Felipe

    
    What do you think?
    
    Cheers,
    Costin
    
    
    On 10/9/19 6:16 PM, Costin Lupu wrote:
    > Hi Simon,
    > 
    > One discussion would be if we should set uktime as a dependency for
    > nolibc rather than propagating it to all libraries that would depend on 
it.
    > 
    > For example, newlib uses functions from uktime so it will need it as a
    > mandatory dependency.
    > 
    > Cheers,
    > Costin
    > 
    > On 10/9/19 5:21 PM, Simon Kuenzer wrote:
    >> libvfscore has a dependency to libuktime if it is used built with nolibc.
    >>
    >> Signed-off-by: Simon Kuenzer <simon.kuenzer@xxxxxxxxx>
    >> ---
    >>  lib/vfscore/Config.uk | 1 +
    >>  1 file changed, 1 insertion(+)
    >>
    >> diff --git a/lib/vfscore/Config.uk b/lib/vfscore/Config.uk
    >> index 527922da..c260e5b2 100644
    >> --- a/lib/vfscore/Config.uk
    >> +++ b/lib/vfscore/Config.uk
    >> @@ -2,6 +2,7 @@ config LIBVFSCORE
    >>          bool "vfscore: VFS Core Interface"
    >>          default n
    >>          select LIBNOLIBC if !HAVE_LIBC
    >> +        select LIBUKTIME if !HAVE_LIBC
    >>          select LIBUKDEBUG
    >>          select LIBUKLOCK
    >>  
    >>
    

_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.