linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Boaz Harrosh <boazh@netapp.com>
To: Nikolay Borisov <nborisov@suse.com>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>
Cc: Ric Wheeler <rwheeler@redhat.com>,
	Miklos Szeredi <mszeredi@redhat.com>,
	Steve French <smfrench@gmail.com>,
	Steven Whitehouse <swhiteho@redhat.com>,
	Jefff moyer <jmoyer@redhat.com>, Sage Weil <sweil@redhat.com>,
	Jan Kara <jack@suse.cz>, Amir Goldstein <amir73il@gmail.com>,
	Andy Rudof <andy.rudoff@intel.com>,
	Anna Schumaker <Anna.Schumaker@netapp.com>,
	"Amit Golander" <Amit.Golander@netapp.com>,
	Sagi Manole <sagim@netapp.com>,
	"Shachar Sharon" <Shachar.Sharon@netapp.com>
Subject: Re: [RFC 4/7] zuf: zuf-rootfs && zuf-core
Date: Wed, 14 Mar 2018 20:34:49 +0200	[thread overview]
Message-ID: <72020b69-f688-e057-e5ff-c0cd43173621@netapp.com> (raw)
In-Reply-To: <55ccf39a-288c-d250-02d9-58fec7a1f471@suse.com>

On 14/03/18 14:56, Nikolay Borisov wrote:
> 
> 
> On 13.03.2018 19:36, Boaz Harrosh wrote:
>>
>> zuf-core established the communication channels with
>> the zus UM Server.
>>
>> zuf-root is a psuedo FS that the zus communicates through,
>> registers new file-systems. receives new mount requests.
>>
>> In this patch we have the bring up of that special FS, and
>> the core communication mechanics. Which is the Novelty
>> of this code submission.
>>
>> The zuf-rootfs (-t zuf) is usually by default mounted on
>> /sys/fs/zuf. If an admin wants to run more server applications
>> (Note that each server application supports many types of FSs)
>> He/she can mount a second instance of -t zuf and point the new
>> Server to it.
>>
>> (Otherwise a second instance attempting to communicate with a
>>  busy zuf will fail)
>>
>> TODO: How to trigger a first mount on module_load. Currently
>> admin needs to manually "mount -t zuf none /sys/fs/zuf"
>>
>> Signed-off-by: Boaz Harrosh <boazh@netapp.com>
> <snip>
> 
>> +	while (!relay_is_fss_waiting(&zt->relay)) {
>> +		mb();
> Not something for this early in the development cycle but something to
> keep in mind:
> 
> Always document all assumptions re. memory barriers usage + intended
> pairing scenario otherwise it's very hard to reason whether this is
> correct or not. In fact barriers without comments are considered broken.
> 

Yes. I totally agree. I love it how you commented on the ugliest piece
of code in all of this.

This is BTW totally very wrong and the mb is wrong and is a bandade
over the wrong kind of hurt. Because in theory coming out of sleep
I might be scheduled on another core and I should then pick up a new
zt instead of syncing with the now wrong one.

for a POC it was fine, I get here maybe 0.17% of the times but I will
totally need to put some thought and love into this problem.

I kind of want to move from that Relay object to what Binder is using
and hope to shave off some more latency. So I'll see if I will fix
this or move to new code

Thank you for looking, Yes this is a bad contraption
Boaz

>> +		if (unlikely(!zt->file))
>> +			return -EIO;
>> +		zuf_dbg_err("[%d] can this be\n", cpu);
>> +		/* FIXME: Do something much smarter */
>> +		msleep(10);
>> +		mb();
>> +	}
>> +
>> +	zt->next_opt = hdr;
>> +	zt->pages = pages;
>> +	zt->nump = nump;
>> +
>> +	relay_fss_wakeup_app_wait(&zt->relay, NULL);
>> +
>> +	return zt->file ? hdr->err : -EIO;
>> +}
> 
> <snip>
> 

  reply	other threads:[~2018-03-14 18:35 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-13 17:14 [RFC 0/7] first draft of ZUFS - the Kernel part Boaz Harrosh
2018-03-13 17:15 ` [RFC 1/7] mm: Add new vma flag VM_LOCAL_CPU Boaz Harrosh
2018-03-13 18:56   ` Matthew Wilcox
2018-03-14  8:20     ` Miklos Szeredi
2018-03-14 11:17       ` Matthew Wilcox
2018-03-14 11:31         ` Miklos Szeredi
2018-03-14 11:45           ` Matthew Wilcox
2018-03-14 14:49             ` Miklos Szeredi
2018-03-14 14:57               ` Matthew Wilcox
2018-03-14 15:39                 ` Miklos Szeredi
     [not found]                   ` <CAON-v2ygEDCn90C9t-zadjsd5GRgj0ECqntQSDDtO_Zjk=KoVw@mail.gmail.com>
2018-03-14 16:48                     ` Matthew Wilcox
2018-03-14 21:41       ` Boaz Harrosh
2018-03-15  8:47         ` Miklos Szeredi
2018-03-15 15:27           ` Boaz Harrosh
2018-03-15 15:34             ` Matthew Wilcox
2018-03-15 15:58               ` Boaz Harrosh
2018-03-15 16:10             ` Miklos Szeredi
2018-03-15 16:30               ` Boaz Harrosh
2018-03-15 20:42                 ` Miklos Szeredi
2018-04-25 12:21                   ` Boaz Harrosh
2018-05-07 10:46                     ` Miklos Szeredi
2018-03-13 17:17 ` [RFC 2/7] fs: Add the ZUF filesystem to the build + License Boaz Harrosh
2018-03-13 20:16   ` Andreas Dilger
2018-03-14 17:21     ` Boaz Harrosh
2018-03-15  4:21       ` Andreas Dilger
2018-03-15 13:58         ` Boaz Harrosh
2018-03-13 17:18 ` [RFC 3/7] zuf: Preliminary Documentation Boaz Harrosh
2018-03-13 20:32   ` Randy Dunlap
2018-03-14 18:01     ` Boaz Harrosh
2018-03-14 19:16       ` Randy Dunlap
2018-03-13 17:22 ` [RFC 4/7] zuf: zuf-rootfs && zuf-core Boaz Harrosh
2018-03-13 17:36   ` Boaz Harrosh
2018-03-14 12:56     ` Nikolay Borisov
2018-03-14 18:34       ` Boaz Harrosh [this message]
2018-03-13 17:25 ` [RFC 5/7] zus: Devices && mounting Boaz Harrosh
2018-03-13 17:38   ` Boaz Harrosh
2018-03-13 17:28 ` [RFC 6/7] zuf: Filesystem operations Boaz Harrosh
2018-03-13 17:39   ` Boaz Harrosh
2018-03-13 17:32 ` [RFC 7/7] zuf: Write/Read && mmap implementation Boaz Harrosh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=72020b69-f688-e057-e5ff-c0cd43173621@netapp.com \
    --to=boazh@netapp.com \
    --cc=Amit.Golander@netapp.com \
    --cc=Anna.Schumaker@netapp.com \
    --cc=Shachar.Sharon@netapp.com \
    --cc=amir73il@gmail.com \
    --cc=andy.rudoff@intel.com \
    --cc=jack@suse.cz \
    --cc=jmoyer@redhat.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=mszeredi@redhat.com \
    --cc=nborisov@suse.com \
    --cc=rwheeler@redhat.com \
    --cc=sagim@netapp.com \
    --cc=smfrench@gmail.com \
    --cc=sweil@redhat.com \
    --cc=swhiteho@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).