/images/head.jpg

Programming - Principles and Practice Using C++

This is an introductory book about programming, written by Bjarne Stroustrup, the C++ creator. Quotes Programming is (among other things) a practical skill that you need to practice to master. Learning involves repetition. You must run before you can walk! Babies really do run by themselves before they learn the finer skills of slow, controlled walking. Similarly, you will dash ahead, occasionally stumbling, to get a feel of programming before slowing down to gain the necessary finer control and understanding.

Coordinating Garbage Collection for Arrays of Solid-State Drives

This is the start of a series of blogs I plan to write about existing work related with garbage collection for SSDs. The main idea of this paper is to run garbage collection during idle times to minimize the impact on foreground workloads. Garbage collection is scheduled to run simultaneously at all SSDs, to maximize the time window during which there is no garbage collection, and thus higher application performance. Figure 5 shows their approach and Figure 10 shows the effects.

DAX in ext2 filesystem

msync syscall 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 /mm/msync.c / * MS_SYNC syncs the entire file - including mappings. */ SYSCALL_DEFINE3(msync, unsigned long, start, size_t, len, int, flags) vfs_fsync_range(file, fstart, fend, 1); file->f_op->fsync(file, start, end, datasync); == ext2_fsync(); generic_file_fsync(file, start, end, datasync); __generic_file_fsync(struct file *file, loff_t start, loff_t end, int datasync) file_write_and_wait_range(file, start, end); __filemap_fdatawrite_range(mapping, lstart, lend, WB_SYNC_ALL); do_writepages(mapping, &wbc); mapping->a_ops->writepages(mapping, wbc); ext2_dax_writepages() dax_writeback_mapping_range(mapping, mapping->host->i_sb->s_bdev, wbc); dax_writeback_one(&xas, dax_dev, mapping, entry); dax_flush(dax_dev, page_address(pfn_to_page(pfn)), size); arch_wb_cache_pmem(addr, size); clean_cache_range(addr, size); for (p = (void *)((unsigned long)addr & ~clflush_mask); p < vend; p += x86_clflush_size) clwb(p); static const struct address_space_operations ext2_dax_aops = { .

Wisdom from Michael Stonebraker

Where do ideas come from? Ideas come from two sources: talking to real users with real problems and then trying to solve them. This ensures somebody cares about the ideas and the rubber meets the road and not the sky. The second source is to bounce possibly good (or bad) ideas off colleages that will challenge them. In summary, the best chance for generating a good idea is to spend time in the real world and find an enviroment where you will be intellectually challenged.

Read syscall implementation in Linux Kernel

Interactions among vfs, page cache, and ext2 on serving a read request stack trace for ext2_readpages() in ext2 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 [ 84.037457] Call Trace: [ 84.037458] dump_stack+0x46/0x5b [ 84.037460] ext2_readpages+0x3e/0x90 [ 84.037464] read_pages+0x71/0x1a0 [ 84.037470] ? __do_page_cache_readahead+0x1c9/0x1e0 [ 84.037472] __do_page_cache_readahead+0x1c9/0x1e0 [ 84.037474] ondemand_readahead+0x171/0x2b0 [ 84.037478] ? pagecache_get_page+0x30/0x2c0 [ 84.

AWS re:Invent 2018 tidbits

Amazon RDS PostgreSQL 2 flavors. Open-source PostgreSQL on top of EBS Aurora PostgreSQL on top of Aurora Storage (better performance) Supports Postgre 9.6/10 Aurora Postgres supports one RW master node and many read replicas. A read replica will be promoted to the master node when the original master node fails. Aurora Postgres supports fast clones. Only need to pay for the storage of changed data. Will support logical replication by introducing the logical decoding plugin which converts physical changes to SQL statements.