The GNU C Library or That thing between you and your goal... - - PowerPoint PPT Presentation

the gnu c library or that thing between you and your goal
SMART_READER_LITE
LIVE PREVIEW

The GNU C Library or That thing between you and your goal... - - PowerPoint PPT Presentation

The GNU C Library or That thing between you and your goal... 2013-04-16 Carlos O'Donell Red Hat 1 The GNU C Library | Linux Foundation Collaboration Summit 2013 That thing between you and your goal... Linked against by


slide-1
SLIDE 1

The GNU C Library | Linux Foundation Collaboration Summit 2013 1

“The GNU C Library” or “That thing between you and your goal...”

2013-04-16 Carlos O'Donell Red Hat

slide-2
SLIDE 2

The GNU C Library | Linux Foundation Collaboration Summit 2013 2

That thing between you and your goal...

  • Linked against by virtually all applications...
  • Includes: libc, libm, libpthread
  • Consequently the subject of a lot of complaints...
  • Too slow (Performance)
  • Incorrect behaviour (Conformance)
  • Missing features (New APIs, New machine port)

We like it this way.

slide-3
SLIDE 3

The GNU C Library | Linux Foundation Collaboration Summit 2013 3

That thing between you and your goal...

  • Complaints mean that you're project is in use!
  • Right? Maybe? :-)
  • What next?
  • Stay relevant
  • Engage developers
  • Get developer help to address complaints
  • Give talks like these
slide-4
SLIDE 4

The GNU C Library | Linux Foundation Collaboration Summit 2013 4

Overview

  • Welcome!
  • Whirlwind tour of new stuff!
  • Community status
  • Release status
  • New generic features
  • New machine support
  • Where do we need help?
  • Math library variants
  • Performance and benchmarking
  • Questions?
slide-5
SLIDE 5

The GNU C Library | Linux Foundation Collaboration Summit 2013 5

Welcome!

  • Kernel or application developer alike, glibc has an

impact on you (unless you're on android)!

  • Excellent audience feedback last year
  • We listen!

Remember your questions and save them for the end

  • f the talk!
slide-6
SLIDE 6

The GNU C Library | Linux Foundation Collaboration Summit 2013 6

Community status

  • We've made it through our documented time boxed

release process two more times!

  • Two developers (Andreas Jaegar and myself) stepped

up to become dedicated x86-64 and x86 reviewers (previously only community-based review)

  • New developers pitching in to help with guidance from
  • ld hands.
  • Renewed attention to locales and fixing locale issue
slide-7
SLIDE 7

The GNU C Library | Linux Foundation Collaboration Summit 2013 7

Community status

  • Still in need of an effective bugzilla triage process
  • More patches than core community can review
  • Less than optimal testing infrastructure

Why am I excited by this?

slide-8
SLIDE 8

The GNU C Library | Linux Foundation Collaboration Summit 2013 8

Digression? Logo?

  • Logo contest on LWN?
  • Initial ideas:
  • Keystone (holding up a bridge)?
  • Pillar (old Greek style)?
  • Bird (Glossy Ibis, Obese chimera)
  • Tree?
  • Diamond (Brilliant cut, Round cut)?
  • GNU in a library?
  • Bridge Troll?
  • Commission a logo after the contest is done
slide-9
SLIDE 9

The GNU C Library | Linux Foundation Collaboration Summit 2013 9

Release status:

  • 6th annual LFCS in April 2012
  • “The Future of the GNU C Library”
  • 2.16 released June 2012
  • 2.17 released December 2012
  • 2.18 in active development
  • Time boxed releases
  • Two months left for 2.18 development
  • Many features on the list for 2.18
slide-10
SLIDE 10

The GNU C Library | Linux Foundation Collaboration Summit 2013 10

Release status: 2.18 development

  • Hardware lock elision support
  • Add support to glibc for hardware lock elision on Intel's

Haswell cores (June 2013)

  • Currently under review (next week I promise Andi!)
  • Library dependency handling cleanup
  • Unit test loader internals and dependency ordering
  • Auto-generate millions of possible orderings and test
  • Math routine cleanups
slide-11
SLIDE 11

The GNU C Library | Linux Foundation Collaboration Summit 2013 11

Release status: 2.18 development

  • IPv4/IPv6 dualstack issues.
  • Resolver issues
  • 24 getaddrinfo() bugs in sourceware bugzilla.
  • 14 getaddrinfo() bugs in Red Hat bugzilla.
  • Parallelism and concurency fixes
  • Unification of pthread_once implementations
  • Large TLS segments
  • Review race conditions
slide-12
SLIDE 12

The GNU C Library | Linux Foundation Collaboration Summit 2013 12

Release status: 2.18 development

  • Header cleanup
  • Ended up mirroring the UAPI changes in the Linux

kernel.

  • Looking to ensure that order of Linux header inclusion

doesn't matter.

  • Bugs
  • 54 bugs fixed
  • 2 CVE's
slide-13
SLIDE 13

The GNU C Library | Linux Foundation Collaboration Summit 2013 13

Release status: 2.18 development

2 months left!

slide-14
SLIDE 14

The GNU C Library | Linux Foundation Collaboration Summit 2013 14

New features?

  • glibc-ports repo merged into main glibc repo
  • Based on last year's feedback
  • Ports repository held “2nd class architectures”
  • e.g. ARM, MIPS, etc.
  • History preserved
  • Working to ensure generic changes are done across all

ports

  • If we had the resources we'd convert all targets to ports

and then we'd have a clean core/ports split

slide-15
SLIDE 15

The GNU C Library | Linux Foundation Collaboration Summit 2013 15

New features?

  • Minimum Linux kernel supported is 2.6.16 (2.17).
  • Improved X support:
  • Cross-compilation
  • Cross-testing (wrapper)
  • Boostrap builds (no previous glibc built)
slide-16
SLIDE 16

The GNU C Library | Linux Foundation Collaboration Summit 2013 16

New features?

  • Performance
  • New micro-benchmark suite! (More about this later...)
  • Optimized functions for s390/s390x, POWER7, MIPS,
  • Language
  • C++11 thread_local object destructors on thread and

program exit.

  • Parallelism and Concurrency
  • Support for PI mutexes in generic pthread_cond* code.
slide-17
SLIDE 17

The GNU C Library | Linux Foundation Collaboration Summit 2013 17

New features?

  • Math library
  • IEEE 754:2008 conformance fixes
  • Clearer definition of errors i.e. ulp(x).
  • New locales
  • mag_IN, ayc_PE, doi_IN, ia_FR, mni_IN, nhn_MX,

niu_NU, niu_NZ, sat_IN, szl_PL.

slide-18
SLIDE 18

The GNU C Library | Linux Foundation Collaboration Summit 2013 18

New features?

  • ARM hard-float ABI variant uses /lib/ld-linux-armhf.so.3
  • As of 2.16 with fixes for mixed use environment in 2.18
  • New class of installed header for low-level platform-

specific functionality

  • PowerPC access to timebase register
  • Timezone data no longer installed
  • See tzdata package
slide-19
SLIDE 19

The GNU C Library | Linux Foundation Collaboration Summit 2013 19

New machine support?

  • Xilinx Microblaze as of 2.18
  • In review...
  • ARM AArch64 support as of 2.17
  • 64-bit ARMv8
  • Tilera support as of 2.16
  • TILE-Gx and TILEPro
  • x32 ABI support as of 2.16
  • Hybrid 32-bit/64-bit ABI
slide-20
SLIDE 20

The GNU C Library | Linux Foundation Collaboration Summit 2013 20

New machine support?

  • New machine?
  • Please work with the community.
  • Ensure your port arrives on time.
  • Ensure your port arrives in the release you need.
  • Contact any of the FSF glibc project stewards to talk

about your needs.

Work with us!

slide-21
SLIDE 21

The GNU C Library | Linux Foundation Collaboration Summit 2013 21

Short term goals?

  • More developers, reviewers and testers? YES.
  • More distribution involvement? YES.
  • Getting the word out? YES.
  • Making releases? YES.
  • Bug triage? NO.
  • Cooperation with TIRPC? NO.
slide-22
SLIDE 22

The GNU C Library | Linux Foundation Collaboration Summit 2013 22

Medium term goals?

  • Merging eglibc / glibc? SOME
  • Testing? SOME
  • Criteria for performance management?
  • Documentation? SOME
  • Upgraded testing framework? NO
slide-23
SLIDE 23

The GNU C Library | Linux Foundation Collaboration Summit 2013 23

Long term goals?

  • Autogenerated libm? YES
  • Trace? SOME
  • Dynamic loader
  • Memory allocation routines
  • Threading
  • Math library slow paths
  • Power awareness? NO
  • Exceptionless syscalls? NO
slide-24
SLIDE 24

The GNU C Library | Linux Foundation Collaboration Summit 2013 24

Where is collaboration required?

  • Math library variants
  • Performance benchmarking
  • Runtime tunnables
  • Networking
  • Localization
  • Documentation
slide-25
SLIDE 25

The GNU C Library | Linux Foundation Collaboration Summit 2013 25

Math Library:

  • What's wrong with the math library?
  • Imprecise
  • Don't care
  • Too slow
  • Three variants
  • High precision
  • Default
  • Constant runtime
slide-26
SLIDE 26

The GNU C Library | Linux Foundation Collaboration Summit 2013 26

Math Library:

  • IP6 lab at UPMC in Paris France
  • Metalibm
  • Based on crlibm
  • Uses sollya
  • Proved by gappa
  • Generates C code
  • Compiles into library variants
  • Different functions selected by compile flag?
  • -mfast-math (exists), -mprecise-math (new)
slide-27
SLIDE 27

The GNU C Library | Linux Foundation Collaboration Summit 2013 27

Math Library: “Help Wanted”

  • Expand microbenchmark coverage
  • Validate new libm function implementations
  • Iterating the solution space works sometimes
  • Double? Long double? Multi-variate? NO
  • Build out infrastructure for selecting alternate

implementations

slide-28
SLIDE 28

The GNU C Library | Linux Foundation Collaboration Summit 2013 28

Performance and benchmarking:

  • Claim:
  • high performance
  • No data to backup claim
  • What next?
  • Measure performance
  • Allow users to gather data and identify problems
  • Simple
  • Acceptance criteria for perf patches
slide-29
SLIDE 29

The GNU C Library | Linux Foundation Collaboration Summit 2013 29

Performance and benchmarking:

  • Microbenchmarks
  • Relative differences on one target
  • Specific use cases
  • Whole-system benchmarking
  • Performance impact for your workload?
  • Power consumption impact?`
slide-30
SLIDE 30

The GNU C Library | Linux Foundation Collaboration Summit 2013 30

Performance and benchmarking: “Help Wanted”

  • Add more microbenchmark tests
  • Add more whole system benchmark tests
  • Add systemtap probes to more places in glibc
  • Methods to gather and analyze user results
slide-31
SLIDE 31

The GNU C Library | Linux Foundation Collaboration Summit 2013 31

Runtime Tunables: “Help Wanted”

  • Defaults don't match all workloads
  • Choosing defaults to match average workloads
  • Provide users with the ability to capture their own data
  • Live tuning?
  • API?
  • What's in the ABI?
  • Lots of help required...
slide-32
SLIDE 32

The GNU C Library | Linux Foundation Collaboration Summit 2013 32

Networking: “Help Wanted”

  • IPv4/IPv6 dualstack issues
  • Implementation of getaddrinfo() has issues
  • Doesn't match other OS implementations
  • Causes porting problems
  • Network experts wanted
  • Interpretation of RFCs
  • Experience with implementations across OSs
slide-33
SLIDE 33

The GNU C Library | Linux Foundation Collaboration Summit 2013 33

Locales: “Help Wanted”

  • Language experts
  • Stewardship of locales
  • Strengthen ties to stakeholders in the community
  • GNOME, KDE, etc..
  • Work with CLDR
slide-34
SLIDE 34

The GNU C Library | Linux Foundation Collaboration Summit 2013 34

Documentation: “Help Wanted”

  • Started documenting compliance
  • Thread safety, Async-signal safety, POSIX compliance
  • Whole new chapter on threads!
  • Authors welcome!
slide-35
SLIDE 35

The GNU C Library | Linux Foundation Collaboration Summit 2013 35

Questions?

Thank you for attending this talk! Questions?

  • Ask any questions on libc-help@sourceware.org!
  • Post RFCs or WIPs on libc-alpha@sourceware.org
  • Submit a bug in http://sourceware.org/bugzilla