Skip to content
This repository was archived by the owner on Jun 17, 2019. It is now read-only.

Prefer std::atomic over MemoryBarrier when available #19

Closed
wants to merge 1 commit into from

Conversation

sipa
Copy link
Contributor

@sipa sipa commented Apr 13, 2017

Also submitted upstream as google/leveldb#449.

In port/atomic_pointer.h, the preference is to use MemoryBarrier if available, and only fall back to std::atomic if it isn't available.

I believe it would be preferable to use std::atomic, as it may allow better performance, and integrates without changes into ThreadSanitizer.

This PR changes the preference to std::atomic if available.

@maflcko
Copy link

maflcko commented Apr 16, 2017

Can be closed as duplicate of bitcoin-core/leveldb-subtree#2

@sipa sipa closed this Apr 25, 2017
droark pushed a commit to droark/leveldb-1 that referenced this pull request Oct 6, 2018
…000 to 4096 on 64-bit systems

4874cb8 Increase maximum number of read-only mmap()s used from 1000 to 4096 on 64 bit systems. (Clem Taylor)

Pull request description:

  By default LevelDB will only mmap() up to 1000 ldb files for reading and then fall back
  to using file desciptors.

  The typical linux system has a 'vm.max_map_count = 65530', so mapping only 1000 files
  seems arbitarily small. Increase this value to another arbitrarily small value, 4096.

Tree-SHA512: 42d0978f229603aa882ac47a43ec455be0e27c9c3e4d7e36f7e6b49bab6da7c1bd0d3ffbaca22dfda2a5722fa533d1ce7439e9f99fdedb64df0c4442bbb6a93c
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants