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

Re: [External] [UNIKRAFT PATCH,v2,00/15] Introduce Ring Buffer Implementation


  • To: Alexander Jung <a.jung@xxxxxxxxxxx>, "minios-devel@xxxxxxxxxxxxx" <minios-devel@xxxxxxxxxxxxx>
  • From: "Jung, Alexander" <a.jung@xxxxxxxxxxxxxxx>
  • Date: Tue, 21 Jul 2020 15:46:20 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=lancaster.ac.uk; dmarc=pass action=none header.from=lancaster.ac.uk; dkim=pass header.d=lancaster.ac.uk; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=YVxjaIzgcvkf3ZVScOnXew00kw/WWD2I390zQb2vbKg=; b=NdLUK3IXavRjhI+bJBUlMIql+Wo6m84xMiZC0MPHlXW5V6x8RivT1cZ2QHc8n2KVuai749Qm3EBL73h1IW2w210E4Ei57YC8646SdVDzBEf5jjZmBF+CnxpW5QC9g+e0aEcw3UQOIt0J4dwhcNiyLtshflD6NdV/SGBdyb8BATSLW3MQmT5ofS9PBxPecD5EvHOLKI/tHk1Pzt0dgag88+9/NENv1iUIPiquWXsW8Vs5uSe3iFk6/8TrmfDRzcsP3y9Dr7LYX2EJO0DzcLT2MaYCZwrNcZSAVjClRK5N9hAZm6hWASc8uYlBfU6NtNioKPpPoSltJ+kWA3MOKwgA6A==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dfizevHMFFScCdOXJvQkDEhw4jkAOLDsqi4SehBeiYjsSF1djLa+RWswuwNseVfgxlbsCtougHdIZ580N4ZnW67jikSOwdQQ/twX6hQmq3UFJPt0evgCqTJyAP2UuJI1ebz6icvO13f9MNU1xaBjdiHz7uQynGmve0jIC00AbGfiPBRrk0QxKzWRiMcjo3eVt3D/H903nMDHKOPnhwlPMZR0+ZUvAUqlzsv0Cf7AJRPvlsQWh56noaUBP3/Sr4BNC9biihg3KC1ptzv7QFKsx7s9vqIS6/r0r4mD2JrUVmXocHdLq8qdr1Ik4jb08d5Niktt8yNygTTWahx3OzgOHQ==
  • Authentication-results: lancs.ac.uk; dkim=none (message not signed) header.d=none;lancs.ac.uk; dmarc=none action=none header.from=lancaster.ac.uk;
  • Cc: Felipe Huici <felipe.huici@xxxxxxxxx>, Simon Kuenzer <simon.kuenzer@xxxxxxxxx>, Sharan Santhanam <sharan.santhanam@xxxxxxxxx>, Costin Lupu <costin.lupu@xxxxxxxxx>
  • Delivery-date: Tue, 21 Jul 2020 15:46:27 +0000
  • List-id: Mini-os development list <minios-devel.lists.xenproject.org>
  • Thread-index: AQHWX3U9zqa2fxD4wU2Y5wd0/nzOSKkSTsQA
  • Thread-topic: [External] [UNIKRAFT PATCH,v2,00/15] Introduce Ring Buffer Implementation

I've used the old cover letter for this patch series.

Version 2 changes are as follows:

 * More fine-grain git commits;
 * Moved the ring buffer implementation out of ukmpi and into its own
   library, ukring;
 * Use ukdebug to determine whether to use the implementation's
   internal debugging mechanics; and,
 * Correctly provide variables in `uk_ring_peek_clear_single`.

On 21.07.20, 17:40, "Alexander Jung" <a.jung@xxxxxxxxxxx> wrote:

    This email originated outside the University. Check before clicking links 
or attachments.

    This series introduces a port of FreeBSD's buf_ring.{h,c} implementation 
for use
    within Unikraft.  This simple ring buffer can be used for message passing in
    queues, for example within a AF_UNIX socket implementation between two
    threads.  The implementation is therefore thread safe and provides a generic
    data field which is initialized to the desired ring buffer length.

    The implementation is provided within ukmpi as a new option, LIBUKMPI_RING,
    which exposes the following new methods:

     - uk_ring_alloc
     - uk_ring_free
     - uk_ring_enqueue
     - uk_ring_dequeue
     - uk_ring_dequeue_single
     - uk_ring_advance_single
     - uk_ring_putback_single
     - uk_ring_peek
     - uk_ring_peek_clear_single
     - uk_ring_full
     - uk_ring_empty
     - uk_ring_count

    The port is currently limited, with no support for reading atomic values 
from
    ARM{32,64} CPU registers (described in the comments inline).  As a result, 
use
    of the ring buffer implementation is untested on ARM.

    Alexander Jung (15):
      lib/ukring: Import simple ring buffer from FreeBSD
      lib/ukring: {ring.c, ring.h} Fix checkpatch errors and spacing.
      lib/ukring: Adapt {ring.c, ring.h} to Unikraft
      lib/ukring: Re-prefix methods and structs from buf_ to uk_
      lib/ukring: Remove br_ prefix and rename br variable
      lib/ukring: Disable use of cpu_spinwait function
      lib/ukring: Rename single and multiple consumer functions.
      lib/ukring: Use Unikraft to enable ring buffer debugging
      lib/ukring: Remove unsupported cache line size
      lib/ukring: Disable use of CPU prefetching
      lib/ukring: Properly commment {ring.c, ring.h}
      lib/ukring: Provide KConfig menu option for microlibrary
      lib/ukring: Target files to build for the microlibrary
      lib/ukring: Register ukring with Unikraft
      lib/ukring: Fix unitialized variable

     lib/Makefile.uk              |   1 +
     lib/ukring/Config.uk         |   7 +
     lib/ukring/Makefile.uk       |   6 +
     lib/ukring/exportsyms.uk     |  12 +
     lib/ukring/include/uk/ring.h | 482 +++++++++++++++++++++++++++++++++++
     lib/ukring/ring.c            |  86 +++++++
     6 files changed, 594 insertions(+)
     create mode 100644 lib/ukring/Config.uk
     create mode 100644 lib/ukring/Makefile.uk
     create mode 100644 lib/ukring/exportsyms.uk
     create mode 100644 lib/ukring/include/uk/ring.h
     create mode 100644 lib/ukring/ring.c

    --
    2.20.1



 


Rackspace

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